summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f367398)
raw | patch | inline | side by side (parent: f367398)
author | Lars Hjemli <hjemli@gmail.com> | |
Wed, 3 Jan 2007 13:34:13 +0000 (14:34 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 3 Jan 2007 16:29:01 +0000 (08:29 -0800) |
This modifies pretty_print_commit() to make the output of git-rev-list and
friends a bit more predictable.
A commit body starting with blank lines might be unheard-of, but still possible
to create using git-commit-tree (so is bound to appear somewhere, sometime).
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
friends a bit more predictable.
A commit body starting with blank lines might be unheard-of, but still possible
to create using git-commit-tree (so is bound to appear somewhere, sometime).
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index 544e42629e3213a9927134273899d48c6cbe3161..2a58175aca16dc211cdf5a380e82bc9c0f4d1326 100644 (file)
--- a/commit.c
+++ b/commit.c
const char *after_subject,
int relative_date)
{
- int hdr = 1, body = 0;
+ int hdr = 1, body = 0, seen_title = 0;
unsigned long offset = 0;
int indent = 4;
int parents_shown = 0;
body = 1;
if (is_empty_line(line, &linelen)) {
+ if (!seen_title)
+ continue;
if (!body)
continue;
if (subject)
break;
}
+ seen_title = 1;
if (subject) {
int slen = strlen(subject);
memcpy(buf + offset, subject, slen);