{"thread":{"id":"20676","subject":"Issue with gitweb + tag + branch of the same name from master branch commit","startedAt":"2009-08-20T23:30:31Z","lastAt":"2009-08-22T20:12:51Z","messageCount":4,"participants":["Nicholas A. Bellinger","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"121368","messageId":"1250811031.26147.42.camel@haakon2.linux-iscsi.org","threadId":"20676","inReplyTo":null,"subject":"Issue with gitweb + tag + branch of the same name from master branch commit","fromName":"Nicholas A. Bellinger","fromEmail":"nab@linux-iscsi.org","sentAt":"2009-08-20T23:30:31Z","receivedAt":"2009-08-20T23:30:31Z","isPatch":false,"sender":{"key":"nab@linux-iscsi.org","avatar":null},"body":"Greetings git folks,\n\nI have recently been trying to make a tag and branch of the same name\nfrom a previous <COMMIT> on a master branch on a kernel.org tree using\nthe following commands:\n\n\t# Create the tag:\n\tgit tag -a lio-x.y <COMMIT>\n\t# Push the tags:\n\tgit push --tags origin\n\t# Fetch to be sure\n\tgit fetch origin\n\t# Make tagged branch:\n\tgit checkout -b lio-x.y <COMMIT>\n\t# Make <NEW_COMMIT> to lio-x.y and commit\n        git commit frob\n\t# Switch back to master branch\n\tgit checkout master\n\t# Push local branch to origin\n\tgit push origin refs/heads/lio-x.y\n\nAt this point after pushing to origin, I can do a fresh clone of the\ntree, and do a 'git checkout origin/lio-x.y and I see '<NEW_COMMIT>',\nand the logs and blobs look as expected..\n\nHowever, after checking gitweb log for branch lio-x.y on kernel.org, I\nonly see <COMMIT>, and not <NEW_COMMIT>, and all of the blobs in branch\nlio-x.y still reference the original <COMMIT>, et al.\n\nJohn Hawley has been helping to resolve the issue (I am just going to\nuse different tag/branch names instead), and hpa asked me to report this\nas it is easy to reproduce with the gitweb version on kernel.org..\n\nHere is a bit of the IRC log:\n\n22:30 < nab> Hmm, I wonder if the fact that I was tagging a commit from master, and then branching using the same \n             commit ID to a tag of the same name as the branch..?\n22:33 < warthog9> not use the same name, I think what your doing is fine just the identical naming is whats \n                  causing the problem\n22:33 < warthog9> like tag-lio-3.0\n22:33 < nab> Ahhhhhh\n22:33 < warthog9> and branch: lio-3.0\n22:34 < warthog9> since I think somewhere in git it's got two different orders of preference for tag vs. branch\n22:34 < nab> Ok, so I should just delete the branch and tags and redo with diff names..?\n22:34 < warthog9> one operation is using the tag, one is using the branch and we are seeing the conflicting \n                  results\n\n<SNIP> warthog9 makes somechanges to git repo with gitweb issues </SNIP>\n\n22:40 < warthog9> that *looks* right to me now?\n22:40 < nab> Yep, looks correct\n22:41 < warthog9> so yeah, git is getting confused\n22:41 < warthog9> ok so my theory is right, it's getting confused between the tag / branch\n22:41 < nab> the blob for the ./autoconfigure is correct as well..\n22:42 < nab> Ok, I have no problem using different names.. :-)\n22:42 < warthog9> I would got show this to the git people, it *could* just be an old bug in gitweb (ours is not \n                  particularly up to date) but if I can replicate it here easily enough I'm guessing there's \n                  still a bug elsewhere\n\nMany thanks for your most valuable of time,\n\n--nab\n"},{"id":"121371","messageId":"7vmy5um32h.fsf@alter.siamese.dyndns.org","threadId":"20676","inReplyTo":"1250811031.26147.42.camel@haakon2.linux-iscsi.org","subject":"Re: Issue with gitweb + tag + branch of the same name from master branch commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-08-21T00:19:02Z","receivedAt":"2009-08-21T00:19:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Nicholas A. Bellinger\" <nab@linux-iscsi.org> writes:\n\n> 22:33 < warthog9> not use the same name, I think what your doing is fine just the identical naming is whats \n>                   causing the problem\n> 22:33 < warthog9> like tag-lio-3.0\n> 22:33 < nab> Ahhhhhh\n> 22:33 < warthog9> and branch: lio-3.0\n> 22:34 < warthog9> since I think somewhere in git it's got two different orders of preference for tag vs. branch\n\nI do not speak for gitweb but we typically favor tags over heads.  The\nonly place \"branch name\" take precedence is where the command expects to\nsee a name of a branch, when it can also take any arbitrary object name,\nand changes behaviour.  I.e. \"git checkout X\", when X is a branch name,\nchecks out the branch so that the next commit advances the tip of that\nbranch.\n"},{"id":"121475","messageId":"m3fxbkn5ot.fsf@localhost.localdomain","threadId":"20676","inReplyTo":"1250811031.26147.42.camel@haakon2.linux-iscsi.org","subject":"Re: Issue with gitweb + tag + branch of the same name from master branch commit","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-08-21T22:49:23Z","receivedAt":"2009-08-21T22:49:23Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Nicholas A. Bellinger\" <nab@linux-iscsi.org> writes:\n\n> I have recently been trying to make a tag and branch of the same name\n\nBut why?  Why do you want to confuse git and yourself?\n\n> from a previous <COMMIT> on a master branch on a kernel.org tree using\n> the following commands:\n> \n> \t# Create the tag:\n> \tgit tag -a lio-x.y <COMMIT>\n> \t# Push the tags:\n> \tgit push --tags origin\n> \t# Fetch to be sure\n> \tgit fetch origin\n> \t# Make tagged branch:\n> \tgit checkout -b lio-x.y <COMMIT>\n> \t# Make <NEW_COMMIT> to lio-x.y and commit\n>         git commit frob\n> \t# Switch back to master branch\n> \tgit checkout master\n> \t# Push local branch to origin\n> \tgit push origin refs/heads/lio-x.y\n> \n> At this point after pushing to origin, I can do a fresh clone of the\n> tree, and do a 'git checkout origin/lio-x.y and I see '<NEW_COMMIT>',\n> and the logs and blobs look as expected..\n> \n> However, after checking gitweb log for branch lio-x.y on kernel.org, I\n> only see <COMMIT>, and not <NEW_COMMIT>, and all of the blobs in branch\n> lio-x.y still reference the original <COMMIT>, et al.\n\nI guess that you meant here gitweb's 'log' / 'shortlog' view linked\nfrom 'heads' view, don't you?\n \n> John Hawley has been helping to resolve the issue (I am just going to\n> use different tag/branch names instead), and hpa asked me to report this\n> as it is easy to reproduce with the gitweb version on kernel.org..\n\n> 22:42 < warthog9> I would got show this to the git people, it *could*\n>                   just be an old bug in gitweb (ours is not particularly\n>                   up to date) but if I can replicate it here easily enough\n>                   I'm guessing there's still a bug elsewhere\n\nThis is an old and long fixed (or rather worked around) issue in\ngitweb, fixed in bf901f8 (gitweb: disambiguate heads and tags withs\nthe same name, 2007-12-15)... well if by fixed you can consider\npassing around \"fully qualified\" refnames, i.e. the 'shortlog' link in\n'heads' view now uses 'refs/heads/frob', and not only 'frob'.\n\nJ.H., you might want to consider cherry-picking this... unless you\nhave done that, or independently fixed this issue.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"121524","messageId":"1250971971.26147.122.camel@haakon2.linux-iscsi.org","threadId":"20676","inReplyTo":"m3fxbkn5ot.fsf@localhost.localdomain","subject":"Re: Issue with gitweb + tag + branch of the same name from master branch commit","fromName":"Nicholas A. Bellinger","fromEmail":"nab@linux-iscsi.org","sentAt":"2009-08-22T20:12:51Z","receivedAt":"2009-08-22T20:12:51Z","isPatch":false,"sender":{"key":"nab@linux-iscsi.org","avatar":null},"body":"Greetings Jakub,\n\nOn Fri, 2009-08-21 at 15:49 -0700, Jakub Narebski wrote:\n> \"Nicholas A. Bellinger\" <nab@linux-iscsi.org> writes:\n> \n> > I have recently been trying to make a tag and branch of the same name\n> \n> But why?  Why do you want to confuse git and yourself?\n> \n\nI stumbled the strangeness in k.o gitweb due to my inexperience with git\ntagging+branch..  I absoulutely agree that it makes more sense to use\ndifferent names for these, and that is what I am doing from now on.. :-)\n\n> > from a previous <COMMIT> on a master branch on a kernel.org tree using\n> > the following commands:\n> > \n> > \t# Create the tag:\n> > \tgit tag -a lio-x.y <COMMIT>\n> > \t# Push the tags:\n> > \tgit push --tags origin\n> > \t# Fetch to be sure\n> > \tgit fetch origin\n> > \t# Make tagged branch:\n> > \tgit checkout -b lio-x.y <COMMIT>\n> > \t# Make <NEW_COMMIT> to lio-x.y and commit\n> >         git commit frob\n> > \t# Switch back to master branch\n> > \tgit checkout master\n> > \t# Push local branch to origin\n> > \tgit push origin refs/heads/lio-x.y\n> > \n> > At this point after pushing to origin, I can do a fresh clone of the\n> > tree, and do a 'git checkout origin/lio-x.y and I see '<NEW_COMMIT>',\n> > and the logs and blobs look as expected..\n> > \n> > However, after checking gitweb log for branch lio-x.y on kernel.org, I\n> > only see <COMMIT>, and not <NEW_COMMIT>, and all of the blobs in branch\n> > lio-x.y still reference the original <COMMIT>, et al.\n> \n> I guess that you meant here gitweb's 'log' / 'shortlog' view linked\n> from 'heads' view, don't you?\n\nThat is correct..\n\n>  \n> > John Hawley has been helping to resolve the issue (I am just going to\n> > use different tag/branch names instead), and hpa asked me to report this\n> > as it is easy to reproduce with the gitweb version on kernel.org..\n> \n> > 22:42 < warthog9> I would got show this to the git people, it *could*\n> >                   just be an old bug in gitweb (ours is not particularly\n> >                   up to date) but if I can replicate it here easily enough\n> >                   I'm guessing there's still a bug elsewhere\n> \n> This is an old and long fixed (or rather worked around) issue in\n> gitweb, fixed in bf901f8 (gitweb: disambiguate heads and tags withs\n> the same name, 2007-12-15)... well if by fixed you can consider\n> passing around \"fully qualified\" refnames, i.e. the 'shortlog' link in\n> 'heads' view now uses 'refs/heads/frob', and not only 'frob'.\n>\n\nCool, I am hear it has already been fixed.\n\n--nab\n"}]}