Skip to content

Commit

Permalink
merge-recursive: use find_commit_subject() instead of custom code
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Jul 23, 2010
1 parent 56ff379 commit 49b7120
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions merge-recursive.c
Original file line number Diff line number Diff line change
@@ -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);
}
}
}

0 comments on commit 49b7120

Please sign in to comment.