{"thread":{"id":"20243","subject":"git-svn commit count vs- revision count","startedAt":"2009-07-27T08:45:10Z","lastAt":"2009-07-27T22:13:48Z","messageCount":5,"participants":["Tobi","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"118867","messageId":"4A6D6916.2040509@e-tobi.net","threadId":"20243","inReplyTo":null,"subject":"git-svn commit count vs- revision count","fromName":"Tobi","fromEmail":"listaccount@e-tobi.net","sentAt":"2009-07-27T08:45:10Z","receivedAt":"2009-07-27T08:45:10Z","isPatch":false,"sender":{"key":"listaccount@e-tobi.net","avatar":null},"body":"Hi!\n\nI've `git-svn clone`ed a pretty large repository, which took about 3 days\neven with with local access to the SVN repository. To check that\neverything went ok, I listed the root commits with `git fsck --root\n--full` and verfied, that these are indeed root commits with no branch point.\n\nSo far so good... what's puzzling me is, that `git rev-list --all | wc -l`\nsays I have 40731 commits, but the SVN repository only has 21875 revisons.\n\nShouldn't these numbers be the same? The only explanation I have, is, that\ngit-svn imported one or more branches or tags, where it failed to find the\ncorrect branch point in the history. Is there a way to figure out, if\nthere went something wrong and possibly fix it?\n\nThx,\n\nTobias\n"},{"id":"118868","messageId":"4A6D7A6C.7020909@drmicha.warpmail.net","threadId":"20243","inReplyTo":"4A6D6916.2040509@e-tobi.net","subject":"Re: git-svn commit count vs- revision count","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-07-27T09:59:08Z","receivedAt":"2009-07-27T09:59:08Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Tobi venit, vidit, dixit 27.07.2009 10:45:\n> Hi!\n> \n> I've `git-svn clone`ed a pretty large repository, which took about 3 days\n> even with with local access to the SVN repository. To check that\n> everything went ok, I listed the root commits with `git fsck --root\n> --full` and verfied, that these are indeed root commits with no branch point.\n> \n> So far so good... what's puzzling me is, that `git rev-list --all | wc -l`\n> says I have 40731 commits, but the SVN repository only has 21875 revisons.\n> \n> Shouldn't these numbers be the same? The only explanation I have, is, that\n> git-svn imported one or more branches or tags, where it failed to find the\n> correct branch point in the history. Is there a way to figure out, if\n> there went something wrong and possibly fix it?\n\nWith svn, it is possible to commit to (or create) several branches or\ntags in one go (i.e. revision), whereas with git those would be\nindividual commits. For example, some people always create a commit and\na tag \"pointing\" to it in one go in svn (commit to trunk and tags/foo).\n(The same is true for \"svn style subprojects\", i.e. subdirs used as\nsubprojects.)\n\nIf that has been used to a large extent then it may explain the\ndifference, although it is very large. Have you checked whether git-svn\nproduced the (number of) branches and tags that you expect?\n\nMichael\n"},{"id":"118904","messageId":"4A6E1647.9090207@e-tobi.net","threadId":"20243","inReplyTo":"4A6D6916.2040509@e-tobi.net","subject":"Re: git-svn commit count vs- revision count","fromName":"Tobi","fromEmail":"listaccount@e-tobi.net","sentAt":"2009-07-27T21:04:07Z","receivedAt":"2009-07-27T21:04:07Z","isPatch":false,"sender":{"key":"listaccount@e-tobi.net","avatar":null},"body":"\n> With svn, it is possible to commit to (or create) several branches or\n> tags in one go (i.e. revision), whereas with git those would be\n> individual commits.\n\nI don't think this explains a difference of about 20000 commits.\n\n> difference, although it is very large. Have you checked whether git-svn\n> produced the (number of) branches and tags that you expect?\n\nI can't exactly tell, if all the branches are correct, because a lot of\nthe branches already have been merged and deleted in the SVN repository.\n\nI checked the \"git log --all\" output with a small script to see, where\nmultiple commits belong to the same SVN revision (according to the\ngit-svn-id. Some SVN revions have up to 4 commits.\n\nIf I check some of these commits with `git branch --contains` then it\nseems only one of the commits belongs to branch.\n\nIs it possible, that a commit doesn't belong to any branch?\n\nTobias\n"},{"id":"118911","messageId":"4A6E20D2.70200@e-tobi.net","threadId":"20243","inReplyTo":"4A6E1647.9090207@e-tobi.net","subject":"Re: git-svn commit count vs- revision count","fromName":"Tobi","fromEmail":"listaccount@e-tobi.net","sentAt":"2009-07-27T21:49:06Z","receivedAt":"2009-07-27T21:49:06Z","isPatch":false,"sender":{"key":"listaccount@e-tobi.net","avatar":null},"body":"> Is it possible, that a commit doesn't belong to any branch?\n\nPS: gitk shows something like \"Branches: many (43)\" for such commits -\nwhatever this means...\n"},{"id":"118912","messageId":"4A6E269C.5030605@e-tobi.net","threadId":"20243","inReplyTo":"4A6E20D2.70200@e-tobi.net","subject":"Re: git-svn commit count vs- revision count","fromName":"Tobi","fromEmail":"listaccount@e-tobi.net","sentAt":"2009-07-27T22:13:48Z","receivedAt":"2009-07-27T22:13:48Z","isPatch":false,"sender":{"key":"listaccount@e-tobi.net","avatar":null},"body":"Tobi wrote:\n\n> PS: gitk shows something like \"Branches: many (43)\" for such commits -\n> whatever this means...\n\nPPS: Ok - 1 second of thinking - of course it means, that this commit\nbelongs to 43 branches and I forgot the \"-r\" in \"git branch --contains\".\nSo all commits belong to branch.\n\nBut there are still SVN-Revions with up to 4 commits.\n\nI checked the SVN logs of such revisons and it indeed seems to be the\ncase, that these revisions update multiple branches. The number of touched\nbranches per SVN commit still doesn't match the number of git-commits for\nthis SVN revision, but it at least partially explains the high number of\ngit commits compared to the svn revision count.\n\nTobias\n"}]}