Thread (11 messages) flat view 11 messages, 4 authors, 2016-06-15

Re: [PATCHv4] git-log --format: Add %B tag with %B(n) option

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:30

Johannes Gilger [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/pretty.c b/pretty.c
index f5983f8..dafa8e0 100644
--- a/pretty.c
+++ b/pretty.c
@@ -605,13 +605,17 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
 	int h1, h2;
 
 	/* these are independent of the commit */
+
+	const char *body = msg + c->body_off;
+	const char *end = NULL;
Unfortunately, c->body_off is not valid until you make a call to
parse_commit_message().  Obviously, body is used only after such a call is
made in the original, so I fixed this initialization into an explicit
assignment after the call.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help