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

Re: [PATCH 0/2] Random patches from my tree

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 27, 2008, 20:37 UTC
Message-ID
<alpine.LFD.2.00.0810271328310.3386@nehalem.linux-foundation.org>
In-Reply-To
<alpine.LFD.2.00.0810271256470.3386@nehalem.linux-foundation.org>
On Mon, 27 Oct 2008, Linus Torvalds wrote:
> 
> So the second one allows things like
> 
> 	git log --pretty=oneline --source --all

A better example may have --abbrev-commit, at which point my current git tree looks like this for me:

	52be8b3... refs/heads/master Add a 'source' decorator for commits
	affba33... refs/heads/master Add file delete/create info when we overflow rename
	6806f78... refs/remotes/origin/pu Merge branch 'ar/mksnpath' into pu
	058412d... refs/remotes/origin/pu Fix potentially dangerous uses of mkpath and g
	356af64... refs/remotes/origin/pu Merge branch 'ar/maint-mksnpath' into HEAD
	9fa03c1... refs/remotes/origin/pu Fix potentially dangerous uses of mkpath and g
	94cc355... refs/remotes/origin/pu Fix mkpath abuse in dwim_ref and dwim_log of s
	108bebe... refs/remotes/origin/pu Add mksnpath which allows you to specify the o
	6af1fc2... refs/remotes/origin/man Autogenerated manpages for v1.6.0.3-523-g304d
	61b1229... refs/remotes/origin/html Autogenerated HTML docs for v1.6.0.3-523-g30
	f3ce133... refs/remotes/origin/pu Merge branch 'jc/send-pack-tell-me-more' into 
	2b37e3a... refs/remotes/origin/pu Merge branch 'jk/renamelimit' into pu
	..
ie you can see the the branch that the commits are on.
An example of the ambiguous nature would be 
	304d058... refs/remotes/origin/HEAD Merge branch 'maint'

ie because the HEAD and 'master' branches of refs/remotes/origin are the same, it's ambiguous which one to take, and git will have picked one at random. And obviously when you hit a point where two branches meet again, it really will depend on which branch we happened to be parsing at the time (which generally is "which branch had a commit date that was further back in history").

Another known deficiency: "gitk --source" doesn't work (neither does "gitk --decorate" for that matter). gitk gets very upset indeed if you try, and sucks up CPU cycles in some infinite loop.

		Linus
Previous: Jeff King
Message 14 of 14 in “Random patches from my tree”
  1. 0/2 Random patches from my treeLinus Torvalds, Oct 27, 2008
  2. 1/2 Add file delete/create info when we overflow rename_limitLinus Torvalds, Oct 27, 2008
  3. 2/2 Add a 'source' decorator for commitsLinus Torvalds, Oct 27, 2008
  4. Jeff KingOct 28, 2008
  5. Pierre HabouzitOct 28, 2008
  6. Pierre HabouzitOct 28, 2008
  7. Jeff KingOct 28, 2008
  8. Jeff KingOct 28, 2008
  9. Pierre HabouzitOct 28, 2008
  10. Jeff KingOct 28, 2008
  11. Linus TorvaldsOct 28, 2008
  12. Linus TorvaldsOct 28, 2008
  13. Jeff KingOct 28, 2008
  14. Linus TorvaldsOct 27, 2008

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.