All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Initialize notes trees if %N is used and no --show-notes given
@ 2010-04-05 11:55 Johannes Gilger
  2010-04-06  5:32 ` Jeff King
  2010-04-06  9:27 ` Thomas Rast
  0 siblings, 2 replies; 26+ messages in thread
From: Johannes Gilger @ 2010-04-05 11:55 UTC (permalink / raw)
  To: Git ML

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
---
Hi list,

this bug bit me when I used 'git log --format="%N"' without adding
--show-notes, which caused git to fail an assertion:
 Assertion failed: (display_notes_trees), function format_display_notes, file notes.c, line 1186.

While this patch fixes this behaviour, I'm not sure it's at the right
place or doesn't impact performance. So this is meant more as a
bug-report.

Greetings,
Jojo

 notes.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/notes.c b/notes.c
index e425e19..83f39ae 100644
--- a/notes.c
+++ b/notes.c
@@ -1183,6 +1183,8 @@ void format_display_notes(const unsigned char *object_sha1,
 			  struct strbuf *sb, const char *output_encoding, int flags)
 {
 	int i;
+	if (!display_notes_trees)
+		init_display_notes(NULL);
 	assert(display_notes_trees);
 	for (i = 0; display_notes_trees[i]; i++)
 		format_note(display_notes_trees[i], object_sha1, sb,
-- 
1.7.0.4.360.g11766c

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-04-13 20:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 11:55 [PATCH] Initialize notes trees if %N is used and no --show-notes given Johannes Gilger
2010-04-06  5:32 ` Jeff King
2010-04-06  9:27 ` Thomas Rast
2010-04-06 11:19   ` Johannes Gilger
2010-04-06 11:52     ` Thomas Rast
2010-04-06 16:22       ` Jeff King
2010-04-07  6:18       ` Junio C Hamano
2010-04-07  6:36         ` Jeff King
2010-04-10  7:05   ` [PATCH] pretty.c: Don't expand %N without --show-notes Johannes Gilger
2010-04-10 20:00     ` Junio C Hamano
2010-04-10 21:30       ` [PATCH] Notes: Connect the %N flag to --{show,no}-notes Johannes Gilger
2010-04-10 21:51         ` Junio C Hamano
2010-04-10 22:08           ` Jeff King
2010-04-11 14:54             ` [PATCH] pretty: Initialize notes if %N is used Johannes Gilger
2010-04-12  8:56               ` Jeff King
2010-04-13  8:59                 ` [PATCHv2] " Johannes Gilger
2010-04-13 10:03                   ` Jeff King
2010-04-13 10:36                     ` Johannes Gilger
2010-04-13 10:57                       ` [PATCHv3] " y
2010-04-13 10:57                       ` y
2010-04-13 11:01                       ` Johannes Gilger
2010-04-13 11:07                         ` Jeff King
2010-04-13 11:26                           ` [PATCHv4] " Johannes Gilger
2010-04-13 20:01                             ` Junio C Hamano
2010-04-13 20:31                               ` [PATCHv5] " Johannes Gilger
2010-04-10 22:20           ` [PATCH] Notes: Connect the %N flag to --{show,no}-notes Johannes Gilger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.