On Fri, May 15, 2020 at 11:39 AM Martin Liška <mli...@suse.cz> wrote:
>
> On 5/15/20 3:22 PM, Marek Polacek wrote:
> > On Fri, May 15, 2020 at 03:12:27PM +0200, Martin Liška wrote:
> >> On 5/15/20 2:42 PM, Marek Polacek wrote:
> >>> I actually use mklog -i all the time.  But I can work around it if it
> >>> disappears.
> >>
> >> Ah, I can see a consumer.
> >> There's an updated version that supports that.
> >>
> >> For the future, will you still use the option? Wouldn't be better
> >> to put the ChangeLog content directly to commit message? Note
> >> that you won't have to copy the entries to a particular ChangeLog file.
> >
> > The way I do it is to generate a patch using format-patch, use mklog -i
> > on it, then add the ChangeLog entry to the commit message via commit 
> > --amend.
>
> Hmm, you can do much better with:
>
> $ git diff | ./contrib/mklog > changelog && git commit -a -t changelog
>
> Or for an already created commit you can do:
>
> $ git diff HEAD~ | ./contrib/mklog > changelog && git commit -a --amend -e -F 
> changelog

With these git aliases:

        mklog-editor = "!f() { git show | git gcc-mklog >> $1; }; f"
        addlog = "!f() { GIT_EDITOR='git mklog-editor' git commit --amend; }; f"

I can 'git addlog' to append the output of mklog to the current
commit.  Probably better would be to do something with
prepare-commit-msg.

Jason

Reply via email to