git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More builtin git-am issues..
@ 2015-09-04 23:47 Linus Torvalds
  2015-09-04 23:52 ` Linus Torvalds
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Linus Torvalds @ 2015-09-04 23:47 UTC (permalink / raw)
  To: Junio C Hamano, Paul Tan; +Cc: Git Mailing List

Ok, this may not be new either, but I'm trying to be careful when
using "git am" these days, because I know it got rewritten.

And I _think_ the whitespace handling for adding sign-offs got scrogged.

I just applied the usual patch-bomb from Andrew, and several of the
commits (but not all) end up looking like this:

    Cc: <stable@vger.kernel.org> [3.15+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

note the extraneous whitespace line between Andrew's sign-off and mine.

What's odd is that the emails I'm applying literally don't have that
extra empty line, so it's git that somehow decides to add it.  Only
for a few cases, though.

The pattern *seems* to be that git now looks at the *first* line of
the sign-off block and decides that "this is a sign-off block if that
first line has a sign-ff on it, ie this is fine:

    Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

but the failing cases have a comment by Andrew:

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
    Cc: Xishi Qiu <qiuxishi@huawei.com>
    Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
    Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Taku Izumi <izumi.taku@jp.fujitsu.com>
    Cc: Gu Zheng <guz.fnst@cn.fujitsu.com>
    Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: David Rientjes <rientjes@google.com>
    Cc: <stable@vger.kernel.org>        [4.2.x]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

ie that "[akpm@linux-foundation.org: coding-style fixes]" makes git am
now decide that the previous block of text was not a sign-off block,
so it adds an empty line before adding my sign-off. But very obviously
it *was* a sign-off block.

Maybe this isn't new at all, and it's just that I notice because I'm
looking for "git am" oddities.  Something is clearly wrong in
"has_conforming_footer()".

I *think* it's this part:

                if (!(found_rfc2822 ||
                      is_cherry_picked_from_line(buf + i, k - i - 1)))
                        return 0;

which basically returns 0 for _any_ line in the footer that doesn't
match the found_rfc2822 format.

I really think that if we find any "Signed-off-by:" in that last
chunk, we should not add a whitespace.

Comments?

                    Linus

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2015-09-08 18:14 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 23:47 More builtin git-am issues Linus Torvalds
2015-09-04 23:52 ` Linus Torvalds
2015-09-05  0:07   ` Jeff King
2015-09-05  0:36     ` Linus Torvalds
2015-09-05  0:54   ` Junio C Hamano
2015-09-05  1:06     ` Linus Torvalds
2015-09-05  1:23       ` Junio C Hamano
2015-09-05  1:35         ` Linus Torvalds
2015-09-05 16:01           ` Junio C Hamano
2015-09-05  7:30     ` Johannes Sixt
2015-09-05  8:03       ` Jeff King
2015-09-05 16:10         ` Junio C Hamano
2015-09-05 16:32           ` Junio C Hamano
2015-09-05 16:57             ` Junio C Hamano
2015-09-05 19:39           ` Junio C Hamano
2015-09-07 19:27             ` Christian Couder
2015-09-05 15:24       ` Junio C Hamano
2015-09-05 15:34         ` Junio C Hamano
2015-09-05  1:06 ` Junio C Hamano
2015-09-05  1:20   ` Linus Torvalds
2015-09-05  1:24     ` Junio C Hamano
2015-09-06  4:56 ` [PATCH] am: match --signoff to the original scripted version Junio C Hamano
2015-09-06  9:04   ` Paul Tan
2015-09-06 17:24     ` Junio C Hamano
2015-09-08  6:18       ` Jeff King
2015-09-06 14:21   ` Paul Tan
2015-09-06 17:39     ` Junio C Hamano
2015-09-06 16:16   ` Linus Torvalds
2015-09-08  6:25   ` Jeff King
2015-09-08 18:14     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).