Re: Git log --tags isn't working as expected

2 messages, 2 authors, 2017-08-02 · open the first message on its own page

Re: Git log --tags isn't working as expected

From: Junio C Hamano <hidden>
Date: 2017-08-02 20:28:50

Jeff King [off-list ref] writes:
By the way, I noticed something funny that I forgot to mention:

  git log --tags=does-not-exist

shows HEAD, because the logic to kick in the default only asks "were we
given any refs to start the traversal?". I think it probably should
consider a wildcard with no matches to override the default, and show
nothing.

I haven't decided if it should be empty-but-success, or give an error.
I agree.  The same for --branches, --glob, etc.  I'd say it should
behave just like "git log HEAD..HEAD".

Re: Git log --tags isn't working as expected

From: Jeff King <hidden>
Date: 2017-08-02 22:15:18

On Wed, Aug 02, 2017 at 01:28:38PM -0700, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
By the way, I noticed something funny that I forgot to mention:

  git log --tags=does-not-exist

shows HEAD, because the logic to kick in the default only asks "were we
given any refs to start the traversal?". I think it probably should
consider a wildcard with no matches to override the default, and show
nothing.

I haven't decided if it should be empty-but-success, or give an error.
I agree.  The same for --branches, --glob, etc.  I'd say it should
behave just like "git log HEAD..HEAD".
Thanks for confirming. That's the way I lean, too. And I found some
related tests for rev-list in t6018 that expect that, too (but are
currently marked to fail).

I'll send some patches in a minute, but I'll start a new thread, as
we've drifted off-topic for this one.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help