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

Re: How to display "HEAD~*" in "git log"

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2022, 17:31 UTC
Message-ID
<xmqqo7y2i1vv.fsf@gitster.g>
In-Reply-To
<YsWebbaOJbaOZ6i7@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> And finally, if you really like this, you can configure git-log's pager
> to always pipe through name-rev, like this:
>
>   [pager]
>         log = "git name-rev --stdin | less"

I was about to suggest "name-rev --annotate-stdin" (which happened during your sabbatical) but this is even better.

> ... (and I
> wouldn't be surprised if it's a little challenging, just because you'd
> have two traversals going on at once in the same program).
A little challenging ;-)

But it may not be so bad. The "name-rev" traversal uses none of the usual "revision" traversal machinery and keeps track of its state in its own commit slab. It would not be as hard as running two usual revision traversals simultaneously.

Previous: Jeff King
Message 11 of 11 in “How to display "HEAD~*" in "git log"”
  1. wuzhouhuiJul 5, 2022
  2. Konstantin KhomoutovJul 5, 2022
  3. Konstantin KhomoutovJul 5, 2022
  4. wuzhouhuiJul 5, 2022
  5. kostix@bswap.ruJul 6, 2022
  6. Jeff KingJul 6, 2022
  7. Konstantin KhomoutovJul 6, 2022
  8. Jeff KingJul 6, 2022
  9. Konstantin KhomoutovJul 6, 2022
  10. Jeff KingJul 7, 2022
  11. Junio C HamanoJul 6, 2022

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.