On Wed, Aug 01, 2018 at 12:16:57AM +0100, Maciej W. Rozycki wrote:
> On Thu, 5 Jul 2018, Tom Tromey wrote:
> 
> > I use git-merge-changelog from gnulib.  If you want to use git am and
> > avoid manually copying ChangeLog text from the commit message back into
> > the appropriate files, then it's much better to install the driver and
> > include the ChangeLog diffs in the patch submission.
> 
>  FWIW, I've found it quite quick to paste ChangeLog text from the commit 
> message after `git am' (directly invocable for the intended submission 
> from alpine e-mail client, which has a "pipe message" command) by adding 
> an empty first line to the intended ChangeLog file, marking it with ^V and 
> then issuing:
> 
> :'<,'>!git log -1
> 
> in vim, removing any commit description preceding the ChangeLog entry and 
> fixing up formatting of the newly-added entry by marking it with ^V and 
> then with:
> 
> :'<,'>s/^    //g
> 
> If more than one ChangeLog file is used, then parts of the entry can be 
> carried over via buffers.  Perhaps the most involving is adding the date 
> and author heading, but I don't think you can completely avoid manual 
> intervention here anyway.  Then:
> 
> $ git commit -a --amend
> $ git rebase --ignore-date origin/master
> 
>  For ChangeLog entries contained in a single file it takes maybe a few 
> seconds, for more complex one a couple dozens perhaps.
> 
>  Of course the amount of effort required for that will likely vary between 
> e-mail clients and editors.

I wrote the attached python for myself so I could run git
show--format="%B" | ./applylog.py to apply the log given that I don't
reimport commits from email before commiting given I already have them
locally in git and use git-svn.  That said while its not terribly hard
with several commits its still a bunch of completely useless busywork.
And that's ignoring the much larger amount of busywork involved in
generating the changelog in the first place which if you follow the GNU
rules about describing the diff without explaining it is basically by
definition mechanical.

Thanks

Trev

> 
>   Maciej

Reply via email to