Merge branch 'jc/maint-fix-mailinfo-strip'
authorJunio C Hamano <gitster@pobox.com>
Sun, 7 Mar 2010 20:47:14 +0000 (12:47 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 7 Mar 2010 20:47:14 +0000 (12:47 -0800)
* jc/maint-fix-mailinfo-strip:
mailinfo: do not strip leading spaces even for a header line

builtin-mailinfo.c
t/t5100/msg0015
index a50ac2256cdbacd76ed44a50804212be07f949db..ce2ef6bede40fde8823336bc85762bd3e7cd4760 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 9577238685acecd1b5d530ffa3f4f03eef25b9b6..4abb3d5c6c4884806cdaabcc0b01acb9c1263af2 100644 (file)
@@ -1,2 +1,2 @@
-- a list
+  - a list
   - of stuff