Re: [PATCH] am: match --signoff to the original scripted version

2015-09-08 Thread Jeff King
On Sat, Sep 05, 2015 at 09:56:27PM -0700, Junio C Hamano wrote: > +static void am_signoff(struct strbuf *sb) > +{ > + char *cp; > + struct strbuf mine = STRBUF_INIT; > + > + /* Does it end with our own sign-off? */ > + strbuf_addf(, "\n%s%s\n", > + sign_off_header,

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-08 Thread Jeff King
On Sun, Sep 06, 2015 at 10:24:12AM -0700, Junio C Hamano wrote: > >> + /* Does it end with our own sign-off? */ > >> + strbuf_addf(, "\n%s%s\n", > >> + sign_off_header, > >> + fmt_name(getenv("GIT_COMMITTER_NAME"), > >> +

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-08 Thread Junio C Hamano
Jeff King writes: > On Sat, Sep 05, 2015 at 09:56:27PM -0700, Junio C Hamano wrote: > >> +static void am_signoff(struct strbuf *sb) >> +{ >> +char *cp; >> +struct strbuf mine = STRBUF_INIT; >> + >> +/* Does it end with our own sign-off? */ >> +strbuf_addf(,

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-06 Thread Paul Tan
Hi, Thanks for handling this. On Sun, Sep 6, 2015 at 12:56 PM, Junio C Hamano wrote: > Linus noticed that the recently reimplementated "git am -s" defines s/reimplementated/reimplemented/ ? > the trailer block too rigidly, resulting an unnecessary blank line s/resulting

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-06 Thread Paul Tan
On Sun, Sep 6, 2015 at 12:56 PM, Junio C Hamano wrote: > diff --git a/builtin/am.c b/builtin/am.c > index 634f7a7..e7828e5 100644 > --- a/builtin/am.c > +++ b/builtin/am.c > @@ -1191,6 +1191,33 @@ static void NORETURN die_user_resolve(const struct > am_state *state) >

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-06 Thread Junio C Hamano
Paul Tan writes: >> + /* Does it have any Signed-off-by: in the text */ >> + for (cp = sb->buf; >> +cp && *cp && (cp = strstr(cp, sign_off_header)) != NULL; >> +cp = strchr(cp, '\n')) { >> + if (sb->buf == cp || cp[-1] ==

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-06 Thread Junio C Hamano
Paul Tan writes: > s/reimplementated/reimplemented/ ? > s/resulting an/resulting in an/ ? > s/extra blank/extra blank line/ ? Thanks. >> +static void am_signoff(struct strbuf *sb) >> +{ > > Hmm, okay, but now we have two similarly named functions am_signoff() > and

Re: [PATCH] am: match --signoff to the original scripted version

2015-09-06 Thread Linus Torvalds
On Sat, Sep 5, 2015 at 9:56 PM, Junio C Hamano wrote: > > For > the upcoming release, stop using the append_signoff() in "git am" > and reimplement the looser definition used by the scripted version > to use only in "git am" to fix this regression in "am"

[PATCH] am: match --signoff to the original scripted version

2015-09-05 Thread Junio C Hamano
Linus noticed that the recently reimplementated "git am -s" defines the trailer block too rigidly, resulting an unnecessary blank line between the existing sign-offs and his new sign-off. An e-mail submission sent to Linus in real life ends with mixture of sign-offs and commentaries, e.g.