Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-09 09:36:40 +0400
committerJunio C Hamano <gitster@pobox.com>2010-05-09 09:36:40 +0400
commit67e5c87cd60668c97712b14af8562b558239a757 (patch)
tree508a43b693a187a2c0f6e7513193a23c4d7c24c5 /pretty.c
parentea28baed79981e065a5a6d39323c4fb7d2b51685 (diff)
parent1367b12ad623e28546ba40c435015d94e7fbb248 (diff)
Merge branch 'eb/unpretty-b-format'
* eb/unpretty-b-format: Add `%B' in format strings for raw commit body in `git log' and friends
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 7cb3a2af50..742b48bbd6 100644
--- a/pretty.c
+++ b/pretty.c
@@ -800,6 +800,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. */