Merge branch 'cc/find-commit-subject'
* cc/find-commit-subject: blame: use find_commit_subject() instead of custom code merge-recursive: use find_commit_subject() instead of custom code bisect: use find_commit_subject() instead of custom code revert: rename variables related to subject in get_message() revert: refactor code to find commit subject in find_commit_subject() revert: fix off by one read when searching the end of a commit subject
This commit is contained in:
@ -136,16 +136,10 @@ static void output_commit_title(struct merge_options *o, struct commit *commit)
|
||||
if (parse_commit(commit) != 0)
|
||||
printf("(bad commit)\n");
|
||||
else {
|
||||
const char *s;
|
||||
int len;
|
||||
for (s = commit->buffer; *s; s++)
|
||||
if (*s == '\n' && s[1] == '\n') {
|
||||
s += 2;
|
||||
break;
|
||||
}
|
||||
for (len = 0; s[len] && '\n' != s[len]; len++)
|
||||
; /* do nothing */
|
||||
printf("%.*s\n", len, s);
|
||||
const char *title;
|
||||
int len = find_commit_subject(commit->buffer, &title);
|
||||
if (len)
|
||||
printf("%.*s\n", len, title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user