Re: [PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-10 Thread Jeff King
On Sat, Sep 08, 2012 at 04:10:59PM +0200, Robin Stocker wrote: > > > Maybe the solution is to detect if the original commit message > > > ends with a trailer and in that case keep the existing behavior > > > of not inserting a blank line? > > > > Yeah, that sounds like a good change from "this ma

Re: [PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-08 Thread Robin Stocker
Junio C Hamano writes: > Robin Stocker writes: > > > Junio C Hamano writes: > >> Robin Stocker writes: > >> > >> > if (opts->record_origin) { > >> > + /* Some implementations don't terminate message with final \n, > >> > so > >> > add it */ > >> > + if (msg.message[strlen(msg.me

Re: [PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-05 Thread Junio C Hamano
Robin Stocker writes: > Junio C Hamano writes: >> Robin Stocker writes: >> >> >if (opts->record_origin) { >> > + /* Some implementations don't terminate message with final \n, so >> > add it */ >> > + if (msg.message[strlen(msg.message)-1] != '\n') >> > + strbuf_addch(&msgbuf, '\n')

Re: [PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-05 Thread Robin Stocker
Junio C Hamano writes: > Robin Stocker writes: > > > if (opts->record_origin) { > > + /* Some implementations don't terminate message with final \n, so > > add it */ > > + if (msg.message[strlen(msg.message)-1] != '\n') > > + strbuf_addch(&msgbuf, '\n'); > > I can agree that this is

Re: [PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-04 Thread Junio C Hamano
Robin Stocker writes: > if (opts->record_origin) { > + /* Some implementations don't terminate message with > final \n, so add it */ > + if (msg.message[strlen(msg.message)-1] != '\n') > + strbuf_addch(&msgbuf, '\n

[PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-04 Thread Robin Stocker
Before this, git cherry-pick -x resulted in messages like this: Message of cherry-picked commit (cherry picked from commit 871e293c9acbeaacce59dcd98fab6028f552f5be) Which is not the recommended way to write commit messages. When the commit message ends with a Signed-off-by, it's less bad.