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

Re: svn to git, N-squared?

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 12, 2006, 19:17 UTC
Message-ID
<Pine.LNX.4.64.0606121214420.5498@g5.osdl.org>
In-Reply-To
<f36b08ee0606121204q1f9dfb5dv3c09c4e9e6a16a0f@mail.gmail.com>
On Mon, 12 Jun 2006, Yakov Lerner wrote:
> 
> Is this related to 1-level dir tree for objects (12/object)
> vs 2-level dir tree (12/34/object) ? Does git employ more levels
> for object tree for large projects ?

The "more levels" approach was certainly an option early on, when we discussed how the objects should be spread out.

It was basically made a non-issue by the pack-files. These days, the rule is really more along the lines of "if you ever have more than a few thousand files, you've not repacked properly".

The git-svnimport script obviously doesn't do it right, but it should be trivial to fix. For the git cvsimporter, the fix was literally to just do

	$commitcount++;
	..
	if (($commitcount & 1023) == 0) {
		system("git repack -a -d");  
	}

when committing and that was it. It doesn't get much simpler than that, but the svnimporter just hasn't done it yet.

		Linus
Previous: Yakov LernerNext: Randal L. Schwartz
Message 6 of 9 in “svn to git, N-squared?”
  1. Jon SmirlJun 12, 2006
  2. Linus TorvaldsJun 12, 2006
  3. Jon SmirlJun 12, 2006
  4. Linus TorvaldsJun 12, 2006
  5. Yakov LernerJun 12, 2006
  6. Linus TorvaldsJun 12, 2006
  7. Randal L. SchwartzJun 12, 2006
  8. Randal L. SchwartzJun 12, 2006
  9. Eric WongJun 12, 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.