summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfe7eff)
raw | patch | inline | side by side (parent: dfe7eff)
author | Christian Couder <chriscool@tuxfamily.org> | |
Thu, 22 Jul 2010 13:18:33 +0000 (15:18 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Jul 2010 23:12:47 +0000 (16:12 -0700) |
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.c | patch | blob | history |
diff --git a/bisect.c b/bisect.c
index b556b11610480afd80cddd86a81af9737254ee36..060c042f8bcc2d402cb9908be3bdbd3bb180a862 100644 (file)
--- a/bisect.c
+++ b/bisect.c
enum object_type type;
unsigned long size;
char *buf = read_sha1_file(commit->object.sha1, &type, &size);
- char *ep, *sp;
+ const char *subject_start;
+ int subject_len;
fprintf(stderr, "%c%c%c ",
(flags & TREESAME) ? ' ' : 'T',
fprintf(stderr, " %.*s", 8,
sha1_to_hex(pp->item->object.sha1));
- sp = strstr(buf, "\n\n");
- if (sp) {
- sp += 2;
- for (ep = sp; *ep && *ep != '\n'; ep++)
- ;
- fprintf(stderr, " %.*s", (int)(ep - sp), sp);
- }
+ subject_len = find_commit_subject(buf, &subject_start);
+ if (subject_len)
+ fprintf(stderr, " %.*s", subject_len, subject_start);
fprintf(stderr, "\n");
}
}