autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] maint: Allow amendments to git log when generating Chang


From: Eric Blake
Subject: Re: [PATCH 3/3] maint: Allow amendments to git log when generating ChangeLog
Date: Thu, 22 Dec 2016 15:46:18 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

[adding coreutils]

On 12/22/2016 03:36 PM, Eric Blake wrote:
> Copied from Coreutils.  Note that git-log-fix does not yet
> exist, and even when it does, it will not be part of the
> tarball (since it only makes sense in the context of a git
> checkout).
> 
> * Makefile.am (gen-ChangeLog): Allow for corrections.
> 
> Signed-off-by: Eric Blake <address@hidden>
> ---
>  Makefile.am | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 296f2b5..b672d66 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -86,7 +86,11 @@ gen_start_date = 2012-01-15 18:00:00 UTC
>  .PHONY: gen-ChangeLog
>  gen-ChangeLog:
>       if test -d $(top_srcdir)/.git; then \
> -       $(top_srcdir)/build-aux/gitlog-to-changelog \
> +       log_fix="$(srcdir)/build-aux/git-log-fix";                    \
> +       test -e "$$log_fix"                                           \
> +         && amend_git_log="--amend=$$log_fix"                        \
> +         || amend_git_log=;                                          \

Note that Autoconf's HACKING file starts by pointing out that it applies
only to a git checkout, and therefore HACKING should NOT be included in
the distribution tarball.  Likewise, any git-log-fix file should not be
part of the tarball (it only makes sense to run the gen-ChangeLog rule
if you are in a git checkout).

Since I just copied autoconf's rule from coreutils, I'm wondering if
coreutils has a plan in place for handling commits that affect only git,
such as committing a change to git-log-fix (right now, coreutils'
git-log-fix has just four revisions - and sadly all of those show up in
the generated ChangeLog, even when that commit changes nothing in the
tarball itself, other than possibly an inter-release version string).

Maybe it's worth improving the gen-ChangeLog rule to use
'--ignore-matching="^git-only:"', so that you can tag all further edits
to git-log-fix as git-only: and automatically exclude those commits from
further muddying the generated ChangeLog.  Thoughts?


> +       $(top_srcdir)/build-aux/gitlog-to-changelog $$amend_git_log   \
>           --since='$(gen_start_date)' > $(distdir)/cl-t \
>           && rm -f $(distdir)/ChangeLog \
>           && mv $(distdir)/cl-t $(distdir)/ChangeLog; \
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]