Re: [PATCH] rev-list: fix place holder %N (notes) in user format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 24, 2012 at 09:38:31PM +0200, Jukka Lehtniemi wrote:

> Signed-off-by: Jukka Lehtniemi <jukka.lehtniemi@xxxxxxxxx>
> ---
> 
>  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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]