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

Re: Kernel headers git tree

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 14, 2006, 01:05 UTC
Message-ID
<Pine.LNX.4.64.0607131800520.5623@g5.osdl.org>
In-Reply-To
<7v4pxlt3xg.fsf@assigned-by-dhcp.cox.net>
On Thu, 13 Jul 2006, Junio C Hamano wrote:
Show 5 quoted lines
> 
> I am not sure what function incparent() is trying to do with
> this:
> 
> 	git rev-list --max-count=1 --topo-order $1 -- .
Yeah, that looks strange.

The "--topo-order" in particular looks pointless, and just slows things down.

The default ordering from git-rev-list (and all other revision listing things, ie "git log" etc) _does_ guarantee that we never show a child before _one_ of its parents has been shown (although "parent" in this case may be the command line).

As such, "--max-count=1 --topo-order" is pointless if you only give one revision, because whether you use --topo-order or not, the first commit will always be the parent of all subsequent commits.

So --topo-order just makes things MUCH MUCH slower with no upsides.

But that thing is doubly strange, because it uses "." as a path specifier. If this is done in the top-most directory, that should mean "all changes", which in turn means that the whole thing should be equivalent to

	git rev-parse "$1^0"

since all commits should make _some_ change, and thus the first revision in the list should always be the top commit - the one you passed in as an argument.

			Linus
Previous: Junio C HamanoNext: David Woodhouse
Message 6 of 27 in “Kernel headers git tree”
  1. David WoodhouseJul 13, 2006
  2. Junio C HamanoJul 14, 2006
  3. David WoodhouseJul 14, 2006
  4. Linus TorvaldsJul 14, 2006
  5. Junio C HamanoJul 14, 2006
  6. Linus TorvaldsJul 14, 2006
  7. David WoodhouseJul 14, 2006
  8. Linus TorvaldsJul 14, 2006
  9. David WoodhouseJul 14, 2006
  10. Linus TorvaldsJul 14, 2006
  11. Daniel BarkalowJul 14, 2006
  12. David WoodhouseJul 14, 2006
  13. Daniel BarkalowJul 14, 2006
  14. Linus TorvaldsJul 14, 2006
  15. David WoodhouseJul 14, 2006
  16. Linus TorvaldsJul 14, 2006
  17. Trivial path optimization testAlex Riesen, Jul 17, 2006
  18. Junio C HamanoJul 24, 2006
  19. Alex RiesenJul 24, 2006
  20. Trivial path optimization testAlex Riesen, Jul 24, 2006
  21. Junio C HamanoJul 14, 2006
  22. David WoodhouseJul 14, 2006
  23. Ian CampbellJul 14, 2006
  24. Junio C HamanoJul 14, 2006
  25. Ingo OeserJul 14, 2006
  26. David WoodhouseJul 14, 2006
  27. Ingo OeserJul 18, 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.