git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Aug 2, 2017, 22:15 UTC
Message-ID
<20170802221512.zvhaow326jq4vucc@sigill.intra.peff.net>
In-Reply-To
<xmqqd18dsoi1.fsf@gitster.mtv.corp.google.com>
On Wed, Aug 02, 2017 at 01:28:38PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> 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".

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
Previous: Junio C Hamano
Message 6 of 6 in “Git log --tags isn't working as expected”
  1. Richard JonesAug 2, 2017
  2. Jeff KingAug 2, 2017
  3. Junio C HamanoAug 2, 2017
  4. Jeff KingAug 2, 2017
  5. Junio C HamanoAug 2, 2017
  6. Jeff KingAug 2, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.