From 1367b12ad623e28546ba40c435015d94e7fbb248 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 24 Mar 2010 22:51:52 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- pretty.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pretty.c') diff --git a/pretty.c b/pretty.c index 6ba3da89b7..14c9568c54 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. */ -- cgit v1.2.1