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

Re: Listing of branch creation time?

From
Junio C Hamano <junkio@cox.net>
Date
Mar 28, 2007, 02:04 UTC
Message-ID
<7vd52um8d9.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0703271759510.6730@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 12 quoted lines
> On Tue, 27 Mar 2007, Jeff King wrote:
>>
>> You have to look at the latest merge-base, but that tells you the last 
>> time you merged with master, not necessarily the first time.
>
> Well, if you know which branch it is a branch off of, don't use 
> merge-base, just do
>
> 	git log --reverse -1 origin..branch
>
> which should pick up the first commit that is on that branch but haven't 
> been merged back to the original branch.

I suspect you fell into the common trap of confused interaction between --max-count and --reverse here. This will show the latest one commit on the branch that is still not in origin.

Similarly, "git log --reverse -1 master" is _not_ the way to find the root commit of the project.

Show 6 quoted lines
> (Personally, if I didn't want the graphical version, I'd likely just do
>
> 	git log origin..branch
>
> and then do '>' in the pager to get to the bottom. That way I can then 
> scroll up and down if I decide I want to get a bigger picture)

What I use myself is git-topic.perl script from the 'todo' branch. It essentially is:

	for topic
        do
        	git [short]log --no-merges master..$topic
	done
with frills.
Previous: Linus TorvaldsNext: Jeff King
Message 16 of 17 in “Listing of branch creation time?”
  1. Bill LearMar 27, 2007
  2. git-branch: add --sort-by-date optionJohannes Schindelin, Mar 27, 2007
  3. Bill LearMar 27, 2007
  4. Teach revision machinery about --no-walkJohannes Schindelin, Jul 23, 2007
  5. Jeff KingMar 27, 2007
  6. Bill LearMar 28, 2007
  7. Jeff KingMar 28, 2007
  8. Bill LearMar 28, 2007
  9. Jeff KingMar 28, 2007
  10. Bill LearMar 28, 2007
  11. David LangMar 27, 2007
  12. Jeff KingMar 28, 2007
  13. Nicolas PitreMar 28, 2007
  14. Nicolas PitreMar 28, 2007
  15. Linus TorvaldsMar 28, 2007
  16. Junio C HamanoMar 28, 2007
  17. Jeff KingMar 28, 2007

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.