summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorEli Barzilay <eli@barzilay.org>2010-03-25 02:51:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-06 06:02:33 (GMT)
commit1367b12ad623e28546ba40c435015d94e7fbb248 (patch)
tree87354dafe601f8b22625e4ffbfd7226d5616740a /pretty.c
parent11766ca4a89ba960271e94281463d1b44654ca3b (diff)
downloadgit-1367b12ad623e28546ba40c435015d94e7fbb248.zip
git-1367b12ad623e28546ba40c435015d94e7fbb248.tar.gz
git-1367b12ad623e28546ba40c435015d94e7fbb248.tar.bz2
Add `%B' in format strings for raw commit body in `git log' and friends
Also update the documentation text and add a test. Signed-off-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pretty.c b/pretty.c
index 6ba3da8..14c9568 100644
--- a/pretty.c
+++ b/pretty.c
@@ -797,6 +797,10 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
case 'e': /* encoding */
strbuf_add(sb, msg + c->encoding.off, c->encoding.len);
return 1;
+ case 'B': /* raw body */
+ /* message_off is always left at the initial newline */
+ strbuf_addstr(sb, msg + c->message_off + 1);
+ return 1;
}
/* Now we need to parse the commit message. */