git-svn commit count vs- revision count
Hi!
I've git-svn cloneed a pretty large repository, which took about 3 days even with with local access to the SVN repository. To check that everything went ok, I listed the root commits with git fsck --root --full and verfied, that these are indeed root commits with no branch point.
So far so good... what's puzzling me is, that git rev-list --all | wc -l says I have 40731 commits, but the SVN repository only has 21875 revisons.
Shouldn't these numbers be the same? The only explanation I have, is, that git-svn imported one or more branches or tags, where it failed to find the correct branch point in the history. Is there a way to figure out, if there went something wrong and possibly fix it?
Thx,
Tobias
Tobi venit, vidit, dixit 27.07.2009 10:45:
Quoted 7 lines
Hi!
I've
git-svn cloneed a pretty large repository, which took about 3 days even with with local access to the SVN repository. To check that everything went ok, I listed the root commits withgit fsck --root --fulland verfied, that these are indeed root commits with no branch point.
Quoted 7 lines
So far so good... what's puzzling me is, that
git rev-list --all | wc -lsays I have 40731 commits, but the SVN repository only has 21875 revisons.Shouldn't these numbers be the same? The only explanation I have, is, that git-svn imported one or more branches or tags, where it failed to find the correct branch point in the history. Is there a way to figure out, if there went something wrong and possibly fix it?
With svn, it is possible to commit to (or create) several branches or tags in one go (i.e. revision), whereas with git those would be individual commits. For example, some people always create a commit and a tag "pointing" to it in one go in svn (commit to trunk and tags/foo). (The same is true for "svn style subprojects", i.e. subdirs used as subprojects.)
If that has been used to a large extent then it may explain the difference, although it is very large. Have you checked whether git-svn produced the (number of) branches and tags that you expect?
Michael
Quoted 4 lines
With svn, it is possible to commit to (or create) several branches or tags in one go (i.e. revision), whereas with git those would be individual commits.
I don't think this explains a difference of about 20000 commits.
Quoted 2 lines
difference, although it is very large. Have you checked whether git-svn produced the (number of) branches and tags that you expect?
I can't exactly tell, if all the branches are correct, because a lot of the branches already have been merged and deleted in the SVN repository.
I checked the "git log --all" output with a small script to see, where multiple commits belong to the same SVN revision (according to the git-svn-id. Some SVN revions have up to 4 commits.
If I check some of these commits with git branch --contains then it seems only one of the commits belongs to branch.
Is it possible, that a commit doesn't belong to any branch?
Tobias
Quoted 1 line
Is it possible, that a commit doesn't belong to any branch?
PS: gitk shows something like "Branches: many (43)" for such commits - whatever this means...
Quoted 2 lines · Tobi
PS: gitk shows something like "Branches: many (43)" for such commits - whatever this means...
PPS: Ok - 1 second of thinking - of course it means, that this commit belongs to 43 branches and I forgot the "-r" in "git branch --contains". So all commits belong to branch.
But there are still SVN-Revions with up to 4 commits.
I checked the SVN logs of such revisons and it indeed seems to be the case, that these revisions update multiple branches. The number of touched branches per SVN commit still doesn't match the number of git-commits for this SVN revision, but it at least partially explains the high number of git commits compared to the svn revision count.
Tobias