summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8104ebf)
raw | patch | inline | side by side (parent: 8104ebf)
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 27 Dec 2008 00:32:49 +0000 (01:32 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 27 Dec 2008 20:02:32 +0000 (12:02 -0800) |
The patch after the next one will use it.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c | patch | blob | history |
diff --git a/pretty.c b/pretty.c
index f6ff31264b6908bac8bf71678e2eaf2e0cefc100..c43497bb24c89d4e0ca5d2c4afba12c8b8f1280f 100644 (file)
--- a/pretty.c
+++ b/pretty.c
return !len;
}
+static const char *skip_empty_lines(const char *msg)
+{
+ for (;;) {
+ int linelen = get_one_line(msg);
+ int ll = linelen;
+ if (!linelen)
+ break;
+ if (!is_empty_line(msg, &ll))
+ break;
+ msg += linelen;
+ }
+ return msg;
+}
+
static void add_merge_info(enum cmit_fmt fmt, struct strbuf *sb,
const struct commit *commit, int abbrev)
{
}
/* Skip excess blank lines at the beginning of body, if any... */
- for (;;) {
- int linelen = get_one_line(msg);
- int ll = linelen;
- if (!linelen)
- break;
- if (!is_empty_line(msg, &ll))
- break;
- msg += linelen;
- }
+ msg = skip_empty_lines(msg);
/* These formats treat the title line specially. */
if (fmt == CMIT_FMT_ONELINE || fmt == CMIT_FMT_EMAIL)