[Pm-utils] [PATCH 1/1] Generate ChangeLog on demand.
dbn.lists at gmail.com
Thu Mar 6 09:55:12 PST 2008
On Wed, Mar 5, 2008 at 7:39 PM, Victor Lowther <victor.lowther at gmail.com> wrote:
> Since git has very fast log creation aand we imported the entire revision
> history from CVS, we can generate ChangeLog on demand instead of having to
> track it.
> Specifically, any make target that requires it (make dist, etc) will pull an
> appropriately-formatted changelog out of git.
I'm all for this, but I have a couple comments on the specifics.
> + @-git log --no-merges --topo-order > $@
1. I'm using git-1.5.3.x and it doesn't have --topo-order. I also
don't know when --no-merges was added.
2. You need to specify where the .git directory is so this will work
when srcdir != builddir. If you have an up to date ChangeLog in the
srcdir, you won't see this issue, but it does exist. So:
git --git-dir=$(srcdir)/.git log ...
Newer git will manage to search up the directory chain to find a .git
directory if builddir is a subdirectory of srcdir, but it's just safer
to specify exactly where it is.
3. Please don't silence the make output. It only serves to make
debugging issues more difficult. If people don't want to see the
commands, they can just redirect to /dev/null.
4. We need to be smarter than using - for handling errors. It would
really suck to end up with an empty ChangeLog in a released tarball.
Personally, I would just drop the - and make it stop if the git-log
failed for any reason. Here's what they do in Xorg, which is more
robust, but may be overkill (this has come up repeatedly since they
started generating the ChangeLog):
More information about the Pm-utils