From: Jeff King <peff@peff.net>
To: Jukka Lehtniemi <jukka.lehtniemi@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] rev-list: fix place holder %N (notes) in user format
Date: Sat, 24 Mar 2012 20:55:04 -0400 [thread overview]
Message-ID: <20120325005504.GA27651@sigill.intra.peff.net> (raw)
In-Reply-To: <1332617911-8281-1-git-send-email-jukka.lehtniemi@gmail.com>
On Sat, Mar 24, 2012 at 09:38:31PM +0200, Jukka Lehtniemi wrote:
> Signed-off-by: Jukka Lehtniemi <jukka.lehtniemi@gmail.com>
> ---
>
> Fixes a bug where the place holder for notes (%N) was not expanded
> in rev-list. To reproduce the bug:
> $ git notes add -m foo
> $ git rev-list --notes --format=format:%N HEAD ^HEAD^
This explanation should probably go in the commit message.
I am not sure the behavior afterwards is right, though. With git-log, I
see the following behaviors:
1. With --notes, notes are displayed.
3. With --no-notes, notes are not displayed.
3. With no options, notes are displayed (i.e., we default to --notes).
4. With --format=%N, notes are displayed (automatically, without
having to use "--notes").
Shouldn't rev-list behave exactly the same way, except for (3)? That is,
it should respect the options in the same way, but default to not
showing notes?
Even with your patch, we seem to be violating points (1) and (4).
"--notes" does nothing by itself, and you need to use it to make "%N"
work.
For (4), you need to use userformat_find_requirement, as git-log does.
I'm not sure without digging how to make (1) work.
-Peff
next prev parent reply other threads:[~2012-03-25 0:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-24 19:38 [PATCH] rev-list: fix place holder %N (notes) in user format Jukka Lehtniemi
2012-03-25 0:55 ` Jeff King [this message]
2012-07-16 18:30 ` [PATCH v2] Fix notes handling in rev-list Jukka Lehtniemi
2012-07-16 19:03 ` Junio C Hamano
2012-07-17 3:17 ` Jeff King
2012-07-17 3:40 ` Junio C Hamano
2012-07-17 3:51 ` Jeff King
2012-07-17 3:46 ` Jeff King
2012-07-17 5:42 ` Junio C Hamano
2012-07-17 21:22 ` Jukka Lehtniemi
2012-07-18 7:21 ` Jeff King
2012-07-18 22:39 ` Junio C Hamano
2012-07-19 11:35 ` Jeff King
2012-07-19 17:20 ` Junio C Hamano
2012-07-19 17:25 ` Jeff King
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=20120325005504.GA27651@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jukka.lehtniemi@gmail.com \
/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).