summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-03-07 12:47:14 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-03-07 12:47:14 -0800
commit1dd5db8fda9bb70584288f061afffb4d0c23bb39 (patch)
tree71978ea9844498e4ec430a1b0ed484c277676f8c
parentSync with 1.7.0.2 (diff)
parentmailinfo: do not strip leading spaces even for a header line (diff)
downloadtgif-1dd5db8fda9bb70584288f061afffb4d0c23bb39.tar.xz
Merge branch 'jc/maint-fix-mailinfo-strip'
* jc/maint-fix-mailinfo-strip: mailinfo: do not strip leading spaces even for a header line
-rw-r--r--builtin-mailinfo.c3
-rw-r--r--t/t5100/msg00152
2 files changed, 2 insertions, 3 deletions
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