{"thread":{"id":"19284","subject":"[BUG] git-svn: HEAD pointing to a tag after cloning","startedAt":"2009-05-11T11:08:38Z","lastAt":"2009-05-11T11:50:06Z","messageCount":2,"participants":["Yann Dirson","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"113532","messageId":"37678.10.0.0.1.1242040118.squirrel@intranet.linagora.com","threadId":"19284","inReplyTo":null,"subject":"[BUG] git-svn: HEAD pointing to a tag after cloning","fromName":"Yann Dirson","fromEmail":"ydirson@linagora.com","sentAt":"2009-05-11T11:08:38Z","receivedAt":"2009-05-11T11:08:38Z","isPatch":false,"sender":{"key":"ydirson@linagora.com","avatar":null},"body":"The following happens with git 1.6.3.  For some reason git-svn sets HEAD\nto the wrong branch.  Not sure what happens here, $self->full_url seems to\nbe used for a wrong purpose somewhere in the code.\n\n\n(you can see a commit on the \"tag\" branch, which got committed at the\nwrong place because the user did not notice that HEAD was not pointing to\nthe correct branch)\n\n$ git svn clone --stdlayout svn://xxxx/at-remote test\n[....]\nSuccessfully followed parent\nr3287 = 08b210cf2e97caeb6d431a4a0bc594702aa9c6d2 (tags/luciole-2.0.4)\nFound possible branch point: svn://xxxx/at-remote/trunk =>\nsvn://xxxx/at-remote/tags/luciole-2.0.5, 3352\nFound branch parent: (tags/luciole-2.0.5)\nddff7cedbd1d66c836153606db1f80ad3ce6b00d\nFollowing parent with do_switch\nSuccessfully followed parent\nr3367 = 35b21f3f8e206c391f09a788ba9cb6b35f21752d (tags/luciole-2.0.5)\n        M       at-remote\nr3652 = faeb3bab02016b23a7fb7256bbabea305f599022 (tags/luciole-2.0.5)\nChecked out HEAD:\n  svn://xxxx/at-remote/tags/luciole-2.0.5 r3652\n$\n"},{"id":"113534","messageId":"4A0810EE.9030209@drmicha.warpmail.net","threadId":"19284","inReplyTo":"37678.10.0.0.1.1242040118.squirrel@intranet.linagora.com","subject":"Re: [BUG] git-svn: HEAD pointing to a tag after cloning","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-05-11T11:50:06Z","receivedAt":"2009-05-11T11:50:06Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Yann Dirson venit, vidit, dixit 11.05.2009 13:08:\n> The following happens with git 1.6.3.  For some reason git-svn sets HEAD\n> to the wrong branch.  Not sure what happens here, $self->full_url seems to\n> be used for a wrong purpose somewhere in the code.\n> \n> \n> (you can see a commit on the \"tag\" branch, which got committed at the\n> wrong place because the user did not notice that HEAD was not pointing to\n> the correct branch)\n> \n> $ git svn clone --stdlayout svn://xxxx/at-remote test\n> [....]\n> Successfully followed parent\n> r3287 = 08b210cf2e97caeb6d431a4a0bc594702aa9c6d2 (tags/luciole-2.0.4)\n> Found possible branch point: svn://xxxx/at-remote/trunk =>\n> svn://xxxx/at-remote/tags/luciole-2.0.5, 3352\n> Found branch parent: (tags/luciole-2.0.5)\n> ddff7cedbd1d66c836153606db1f80ad3ce6b00d\n> Following parent with do_switch\n> Successfully followed parent\n> r3367 = 35b21f3f8e206c391f09a788ba9cb6b35f21752d (tags/luciole-2.0.5)\n>         M       at-remote\n> r3652 = faeb3bab02016b23a7fb7256bbabea305f599022 (tags/luciole-2.0.5)\n> Checked out HEAD:\n>   svn://xxxx/at-remote/tags/luciole-2.0.5 r3652\n> $\n> \n> \n\nsvn allows you to commit to tags as if they were branches - indeed they\nare branches just as much as svn branches are branches.\n\nTherefore, git-svn represents svn tags as git remote branches (not\ntags). After the clone is done, git-svn checks out the branch on which\nthe last commit was done.\n\nSo, git-svn is doing as it should, under the restrictions that svn puts\non its operations.\n\nOne may argue that master should point to trunk (for --stdlayout)\ninstead after git svn clone, just like master points to master after git\nclone. But which one is \"the correct branch\"? I would claim that the\nclient cannot know and there should be no master (maybe a detached head\nwith the last commit, i.e. HEAD) but last I tried I remained a\n1-person-minority ;)\n\nCheers,\nMichael\n"}]}