From: Jeff King <peff@peff.net>
To: Johannes Gilger <heipei@hackvalue.de>
Cc: Git ML <git@vger.kernel.org>
Subject: Re: [PATCH] Initialize notes trees if %N is used and no --show-notes given
Date: Tue, 6 Apr 2010 01:32:35 -0400 [thread overview]
Message-ID: <20100406053234.GC3901@coredump.intra.peff.net> (raw)
In-Reply-To: <20100405115548.GA19971@macbook.lan.lan>
On Mon, Apr 05, 2010 at 01:55:48PM +0200, Johannes Gilger wrote:
> 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.
> [...]
> --- 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,
I'm not sure if it is right to just pass NULL. We shouldn't have any
extra_refs in our display_notes_opt, because we would have had to
pass --show-notes to do so (at least from my brief reading of the code).
But shouldn't "git show --no-standard-notes --format=%N" pass a
display_notes_opt with suppress_default_notes set?
I don't see it as all that likely (since without --show-notes, you
wouldn't have _any_ notes, so why are you using %N?), but it seems to be
the correct behavior, and might be useful for a script that uses '%N' in
combination with user-provided options.
-Peff
next prev parent reply other threads:[~2010-04-06 5:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100406053234.GC3901@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=heipei@hackvalue.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).