Merge branch 'js/find-commit-subject-ignore-leading-blanks'
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 Jul 2016 17:31:07 +0000 (10:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Jul 2016 17:31:08 +0000 (10:31 -0700)
A helper function that takes the contents of a commit object and
finds its subject line did not ignore leading blank lines, as is
commonly done by other codepaths. Make it ignore leading blank
lines to match.

* js/find-commit-subject-ignore-leading-blanks:
reset --hard: skip blank lines when reporting the commit subject
sequencer: use skip_blank_lines() to find the commit subject
commit -C: skip blank lines at the beginning of the message
commit.c: make find_commit_subject() more robust
pretty: make the skip_blank_lines() function public

1  2 
builtin/commit.c
builtin/reset.c
commit.c
commit.h
pretty.c
sequencer.c
Simple merge
diff --cc builtin/reset.c
Simple merge
diff --cc commit.c
Simple merge
diff --cc commit.h
Simple merge
diff --cc pretty.c
index 330a5e0015bb925b0c76c903aa666712e85ed102,0d40b1b0b1e86c672c122a97d065881b499ac3b8..9fa42c2b4e3cd55fe8ec03248bc19780574bf961
+++ b/pretty.c
@@@ -1806,10 -1709,10 +1806,10 @@@ void pretty_print_commit(struct pretty_
        }
  
        /* Skip excess blank lines at the beginning of body, if any... */
-       msg = skip_empty_lines(msg);
+       msg = skip_blank_lines(msg);
  
        /* These formats treat the title line specially. */
 -      if (pp->fmt == CMIT_FMT_ONELINE || pp->fmt == CMIT_FMT_EMAIL)
 +      if (pp->fmt == CMIT_FMT_ONELINE || cmit_fmt_is_mail(pp->fmt))
                pp_title_line(pp, &msg, sb, encoding, need_8bit_cte);
  
        beginning_of_body = sb->len;
diff --cc sequencer.c
Simple merge