shortlog: handle multi-line subjects like log --pretty=oneline et. al. do
The commit message parser of git shortlog used to treat only the first non-empty line of the commit message as the subject. Other log commands (e.g. --pretty=oneline) show the whole first paragraph instead (unwrapped into a single line). For consistency, this patch borrows format_subject() from pretty.c to make shortlog do the same. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f53bd743ff
commit
cec08717cc
4
pretty.c
4
pretty.c
@ -486,8 +486,8 @@ static void parse_commit_header(struct format_commit_context *context)
|
||||
context->commit_header_parsed = 1;
|
||||
}
|
||||
|
||||
static const char *format_subject(struct strbuf *sb, const char *msg,
|
||||
const char *line_separator)
|
||||
const char *format_subject(struct strbuf *sb, const char *msg,
|
||||
const char *line_separator)
|
||||
{
|
||||
int first = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user