From: Junio C Hamano Date: Mon, 8 Mar 2010 08:35:59 +0000 (-0800) Subject: Merge branch 'jc/maint-fix-mailinfo-strip' into maint X-Git-Tag: v1.7.0.3~30 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6ae611fa8d1e15e918e59b7e20abf98643cd25e4?hp=1f54d693fda851a1df81e2b6c85f1c72f4633916 Merge branch 'jc/maint-fix-mailinfo-strip' into maint * jc/maint-fix-mailinfo-strip: mailinfo: do not strip leading spaces even for a header line --- diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index a50ac2256c..ce2ef6bede 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -779,8 +779,7 @@ static int handle_commit_msg(struct strbuf *line) return 0; if (still_looking) { - strbuf_ltrim(line); - if (!line->len) + if (!line->len || (line->len == 1 && line->buf[0] == '\n')) return 0; } diff --git a/t/t5100/msg0015 b/t/t5100/msg0015 index 9577238685..4abb3d5c6c 100644 --- a/t/t5100/msg0015 +++ b/t/t5100/msg0015 @@ -1,2 +1,2 @@ -- a list + - a list - of stuff