OSDN Git Service

mailinfo: do not strip leading spaces even for a header line
authorJunio C Hamano <gitster@pobox.com>
Sat, 20 Feb 2010 05:55:33 +0000 (21:55 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 Feb 2010 05:55:33 +0000 (21:55 -0800)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailinfo.c
t/t5100/msg0015

index a50ac22..ce2ef6b 100644 (file)
@@ -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;
        }
 
index 9577238..4abb3d5 100644 (file)
@@ -1,2 +1,2 @@
-- a list
+  - a list
   - of stuff