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.

  Maciej

Reply via email to