From: Junio C Hamano Date: Mon, 11 Jul 2016 17:31:07 +0000 (-0700) Subject: Merge branch 'js/find-commit-subject-ignore-leading-blanks' X-Git-Tag: v2.10.0-rc0~136 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/62e5e83f8dfc98e182a1ca3a48b2c69f4fd417ce Merge branch 'js/find-commit-subject-ignore-leading-blanks' 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 --- 62e5e83f8dfc98e182a1ca3a48b2c69f4fd417ce diff --cc pretty.c index 330a5e0015,0d40b1b0b1..9fa42c2b4e --- a/pretty.c +++ 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;