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

Re: git-log to go forward instead of reverse?

From
Junio C Hamano <junkio@cox.net>
Date
Jul 10, 2006, 21:45 UTC
Message-ID
<7vpsgd9lso.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0607101304210.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 6 quoted lines
> And if you didn't know about "git shortlog" already, I personally actually 
> find it easier to read
>
> 	git log --no-merges ORIG_HEAD.. | git shortlog
>
> which orders things by author instead.

Yes, and you can even have '-p' between git and shortlog in the latter command if you do want the pager ;-).

BTW, when I prepare the "What's in" messages, I often find it more useful to have a brother of short-log command that does not group by author but group by topic branch the commits came from.

Currently I prepare the categorized list by hand, reviewing each commit in "master..next" shortlog output. While I do not mind it too much since that is a good way to remind myself what are still cooking, it would be nice to have to a command that takes:

	- which branch the output is relative to (defaults
          to "master");
	- list of branches that are "topics";
        - which branch the parts of topics have been merged to
          (optional -- I'd use "next" for my use).
and for each topic:
	- see if the topic branches off from another topic (for
          example, the merge-tree topic branches off from the
          xdiff-common topic like [*1*]); if so, state that and
          use that branch point instead of "master" in the next
          step;
	- list commits that have not made "master" yet;
          optionally, when "next" is given, limit the output
          only to the ones that have made "next" already.
[Footnote]
*1*
$ git show-branch --topics master lt/xdiff-common lt/merge-tree
* [master] git-rev-list: add documentation for --parents, --no-merges
 ! [lt/xdiff-common] xdiff: generate "anti-diffs" aka what is common...
  ! [lt/merge-tree] Improved three-way blob merging code
---
  + [lt/merge-tree] Improved three-way blob merging code
  + [lt/merge-tree^] Prepare "git-merge-tree" for future work
 ++ [lt/xdiff-common] xdiff: generate "anti-diffs" aka what is common...
*++ [master~67] checkout -m: fix read-tree invocation
Previous: Randal L. SchwartzNext: Junio C Hamano
Message 8 of 11 in “git-log to go forward instead of reverse?”
  1. Randal L. SchwartzJul 10, 2006
  2. Linus TorvaldsJul 10, 2006
  3. Randal L. SchwartzJul 10, 2006
  4. Linus TorvaldsJul 10, 2006
  5. Randal L. SchwartzJul 10, 2006
  6. Linus TorvaldsJul 10, 2006
  7. Randal L. SchwartzJul 10, 2006
  8. Junio C HamanoJul 10, 2006
  9. Junio C HamanoJul 10, 2006
  10. Randal L. SchwartzJul 10, 2006
  11. Linus TorvaldsJul 10, 2006

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.