Re: git notes: notes

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git notes: notes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:04

Jeff King [off-list ref] writes:
quoted hunk
diff --git a/pretty.c b/pretty.c
index 0674027..95fe39a 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1094,7 +1094,8 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
 	if (fmt == CMIT_FMT_EMAIL && sb->len <= beginning_of_body)
 		strbuf_addch(sb, '\n');
 
-	if (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW)
+	if (context->show_notes ||
+	    (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW))
 		get_commit_notes(commit, sb, encoding,
 				 NOTES_SHOW_HEADER | NOTES_INDENT);
Heh, without this hunk I would have thought Peff and Gitster were the same
person ;-).

Once you introduce --no-notes, the above condition would not work well.

Re: git notes: notes

From: Jeff King <hidden>
Date: 2016-06-15 22:48:04

On Wed, Jan 20, 2010 at 02:07:47PM -0800, Junio C Hamano wrote:
quoted
-	if (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW)
+	if (context->show_notes ||
+	    (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW))
 		get_commit_notes(commit, sb, encoding,
 				 NOTES_SHOW_HEADER | NOTES_INDENT);
Heh, without this hunk I would have thought Peff and Gitster were the same
person ;-).

Once you introduce --no-notes, the above condition would not work well.
Yeah, I know, or I would have just added the 2 lines for
--no-show-notes. :) I think your patch is better; I'll comment on it
separately.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help