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