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

Re: [RFC] git-split: Split the history of a git repository by subdirectories and ranges

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 23, 2006, 21:06 UTC
Message-ID
<Pine.LNX.4.64.0610231402560.3962@g5.osdl.org>
In-Reply-To
<453D2B98.8010903@freedesktop.org>
On Mon, 23 Oct 2006, Josh Triplett wrote:
> 
> Or have I misunderstood the case you have concerns about?  Why would the
> "nice" format incur additional cost?

Try it. The default "extreme" simplification is a _hell_ of a lot faster than doing the full history.

	[torvalds@g5 linux]$ time git-rev-list --full-history --parents HEAD -- kernel/sched.c >/dev/null
	real    0m4.660s
	user    0m4.612s
	sys     0m0.044s
	[torvalds@g5 linux]$ time git-rev-list --parents HEAD -- kernel/sched.c >/dev/null
	
	real    0m1.684s
	user    0m1.680s
	sys     0m0.004s

and the "nice" thing will be much slower still: just trying to figure out whether a commit is a parent of another commit is expensive. Doing so for _each_ merge is more expensive still. I think it's O(n^3), but what do I know..

			Linus
Previous: Josh TriplettNext: Linus Torvalds
Message 12 of 19 in “[RFC] git-split: Split the history of a git repository by subdirectories and ranges”
  1. Josh TriplettSep 27, 2006
  2. Junio C HamanoSep 27, 2006
  3. Andy WhitcroftSep 27, 2006
  4. Junio C HamanoSep 27, 2006
  5. Junio C HamanoSep 27, 2006
  6. Josh TriplettOct 23, 2006
  7. Linus TorvaldsOct 23, 2006
  8. Josh TriplettOct 23, 2006
  9. Linus TorvaldsOct 23, 2006
  10. Jakub NarebskiOct 23, 2006
  11. Josh TriplettOct 23, 2006
  12. Linus TorvaldsOct 23, 2006
  13. Linus TorvaldsOct 23, 2006
  14. Johannes SchindelinOct 24, 2006
  15. Linus TorvaldsOct 24, 2006
  16. Junio C HamanoOct 25, 2006
  17. Jakub NarebskiOct 25, 2006
  18. Josh TriplettOct 25, 2006
  19. Junio C HamanoOct 25, 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.