Taylor Blau
5778b22b3d
diff-tree.c: load notes machinery when required
...
Since its introduction in 7249e91 (revision.c: support --notes
command-line option, 2011-03-29), combining '--notes' with any option
that causes us to format notes (e.g., '--pretty', '--format="%N"', etc)
results in a failed assertion at runtime.
$ git rev-list HEAD | git diff-tree --stdin --pretty=medium --notes
commit 8f3d9f354286745c751374f5f1fcafee6b3f3136
git: notes.c:1308: format_display_notes: Assertion `display_notes_trees' failed.
Aborted
This failure is due to diff-tree not calling 'load_display_notes' to
initialize the notes machinery.
Ordinarily, this failure isn't triggered, because it requires passing
both '--notes' and another of the above mentioned options. In the case
of '--pretty', for example, we set 'opt->verbose_header', causing
'show_log()' to eventually call 'format_display_notes()', which expects
a non-NULL 'display_note_trees'.
Without initializing the notes machinery, 'display_note_trees' remains
NULL, and thus triggers an assertion failure.
Fix this by initializing the notes machinery after parsing our options,
and harden this behavior against regression with a test in t4013. (Note
that the added ref in this test requires updating two unrelated tests
which use 'log --all', and thus need to learn about the new refs).
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-20 18:22:54 -07:00
..
2007-07-02 21:05:45 -07:00
2006-07-01 22:02:17 -07:00
2011-02-07 15:04:30 -08:00
2011-02-07 15:04:30 -08:00
2019-01-24 12:18:53 -08:00
2011-04-11 11:16:15 -07:00
2009-02-20 00:02:48 -08:00
2011-04-11 10:12:24 -07:00
2016-08-31 18:07:09 -07:00
2016-08-31 18:07:09 -07:00
2008-05-24 00:16:39 -07:00
2009-01-06 23:18:20 -08:00
2008-05-24 00:16:39 -07:00
2016-12-08 14:40:30 -08:00
2016-12-08 14:40:30 -08:00
2016-12-08 14:40:30 -08:00
2009-02-18 10:55:33 -08:00
2006-07-01 22:02:17 -07:00
2006-07-01 22:02:17 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2016-12-08 14:40:30 -08:00
2016-12-08 14:40:30 -08:00
2016-12-08 14:40:30 -08:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2006-07-01 22:02:17 -07:00
2019-05-29 11:04:32 -07:00
2019-05-29 11:04:32 -07:00
2019-05-29 11:04:32 -07:00
2006-07-01 22:02:17 -07:00
2008-10-12 12:36:19 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2019-01-24 12:18:53 -08:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2019-01-24 12:18:53 -08:00
2006-07-13 21:40:43 -07:00
2020-04-20 18:22:54 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2020-04-20 18:22:54 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2018-02-27 15:22:47 -08:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2006-06-29 12:07:27 -07:00
2006-10-05 15:10:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2018-02-27 15:22:47 -08:00
2006-06-26 14:36:40 -07:00
2020-04-20 18:22:54 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2018-02-27 15:22:47 -08:00
2017-09-28 13:15:59 +09:00
2017-09-28 13:15:59 +09:00
2006-07-13 21:40:43 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2006-07-13 21:40:43 -07:00
2006-07-13 21:40:43 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2018-02-27 15:22:47 -08:00
2006-06-26 14:36:40 -07:00
2006-06-26 14:36:40 -07:00
2017-09-28 13:15:59 +09:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2020-04-20 18:22:54 -07:00
2020-04-20 18:22:54 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2009-02-13 17:18:22 -08:00
2009-02-13 17:18:22 -08:00
2010-08-31 14:30:29 -07:00
2010-08-31 14:30:29 -07:00
2010-08-31 14:30:29 -07:00
2010-03-09 01:11:18 -08:00
2010-03-09 01:11:18 -08:00
2010-03-09 01:11:18 -08:00
2009-02-13 17:18:22 -08:00
2010-08-06 09:14:22 -07:00
2006-07-13 21:40:43 -07:00
2007-10-15 20:24:27 -04:00
2011-03-09 14:28:24 -08:00
2011-03-09 14:28:24 -08:00
2011-03-09 14:28:24 -08:00
2009-02-13 17:18:22 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2017-12-06 07:32:59 -08:00
2009-02-20 00:02:48 -08:00
2009-02-20 00:02:48 -08:00
2010-03-09 01:11:19 -08:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2010-03-09 01:11:18 -08:00
2010-03-09 01:11:19 -08:00
2006-06-26 14:36:40 -07:00
2009-02-13 17:18:22 -08:00
2006-06-26 14:36:40 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2012-04-30 14:17:26 -07:00
2006-07-13 21:40:43 -07:00
2006-07-13 21:40:43 -07:00
2006-07-13 21:40:43 -07:00
2006-07-13 21:40:43 -07:00
2006-07-13 21:40:43 -07:00
2006-07-13 21:40:43 -07:00