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

git log -g bizarre behaviour

From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Date
Jan 31, 2016, 11:52 UTC
Message-ID
<1454241144.2822.7.camel@kaarsemaker.net>

I'm attempting to understand the log [-g] / reflog code enough to untangle them and make reflog walking work for more than just commit objects [see gmane 283169]. I found something which I think is wrong, and would break after my changes.

git log -g HEAD^ and git log -g v2.7.0^ give no output. This is expected, as those are not things that have a reflog. But git log -g v2.7.0 seems to ignore -g and gives the normal log. git reflog v2.7.0 does something even more bizarre:

$ GIT_PAGER= git reflog v2.7.0  7548842 (tag: v2.7.0, seveas/master, origin/master, origin/HEAD) 3e9226a 833e482 (tag: v2.6.5, gitster/maint-2.6) e3073cf e002527 e54d0f5 06b5c93 34872f0 5863990 02103b3 503b1ef 28274d0 (tag: v2.7.0-rc3) aecb997 7195733 e929264 ce858c0 5fa9ab8

Yes, that's a humongous line (I've only copied parts of it).

I'd like to make git log -g / git reflog abort early when trying to display a reflog of a ref that has no reflog. Objections?

-- 
Dennis Kaarsemaker
www.kaarsemaker.net
Next: Junio C Hamano
Message 1 of 10 in “git log -g bizarre behaviour”
  1. Dennis KaarsemakerJan 31, 2016
  2. Junio C HamanoFeb 1, 2016
  3. Dennis KaarsemakerFeb 2, 2016
  4. Junio C HamanoFeb 2, 2016
  5. Dennis KaarsemakerFeb 2, 2016
  6. Junio C HamanoFeb 2, 2016
  7. log -g: ignore revision parameters that have no reflogDennis Kaarsemaker, Feb 2, 2016
  8. Junio C HamanoFeb 3, 2016
  9. Dennis KaarsemakerFeb 3, 2016
  10. Junio C HamanoFeb 3, 2016

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.