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

Eric Blake <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches,gmane.comp.gnu.coreutils.general
Organization Red Hat, Inc.
Message-ID <[email protected]>
[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 <[email protected]>
> ---
>  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
signature.asc (application/pgp-signature, 604 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJYXEmqAAoJEKeha0olJ0NqVeQH/AruJBZq5n9I1SRcMznuhwTV
C+Xu1tg2qPQpHTrcVr2AWao90MG9yK+UPVd5lCljc5IoaYeHRrbfI2jniBm8iVJ6
Q3Zq53e0ZyahchdnvDfj6SMzJd5kBzNSMO8ur0Ff7u7vS/2D12B7E8hYysYCb7YG
nQ1+EP6I4w8QM9IPnPIGl4rAsTWXHoueFKBjjVC37yKzADVXk8sDd0q1Z2r275NJ
T8ZTnxgHd5jZKLui5cAhhjXijnEWp/6FVyxBo67/Rc8w3b6GE9AMk0+cZh4RoeHy
Ay72XDYWYA+aq8FbY3KQyLaDR8KIO9kDEsCIWGz9dSo3yg2hX7KvVoXiXtTnom8=
=/glj
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.