{"thread":{"id":"26443","subject":"Git describe finding wrong tag","startedAt":"2011-02-08T04:46:23Z","lastAt":"2011-02-08T07:23:15Z","messageCount":3,"participants":["Kevin Ballard","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"160679","messageId":"A76F5A9B-6E22-40D5-A8C9-C471A22DF1BE@sb.org","threadId":"26443","inReplyTo":null,"subject":"Git describe finding wrong tag","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2011-02-08T04:46:23Z","receivedAt":"2011-02-08T04:46:23Z","isPatch":false,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"I just encountered an odd situation where `git describe` insists on finding the\nwrong tag. In my case, I tagged a branch, then merged it into another branch,\nand now `git describe` in that other branch decides that it should emit a tag\nname that's over 200 commits old rather than the one that's a single commit\naway.\n\n% git --version\ngit version 1.7.4.31.g3f8c4\n% git describe\nbuild_1.2.2_applestore_1-203-g742967b\n% git describe HEAD^2\nbuild_1.2.2\n\nIs there any rational for why git-describe is opting for the much older\ncommit?\n\n-Kevin Ballard"},{"id":"160681","messageId":"4D50EE88.8070005@viscovery.net","threadId":"26443","inReplyTo":"A76F5A9B-6E22-40D5-A8C9-C471A22DF1BE@sb.org","subject":"Re: Git describe finding wrong tag","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2011-02-08T07:19:36Z","receivedAt":"2011-02-08T07:19:36Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 2/8/2011 5:46, schrieb Kevin Ballard:\n> I just encountered an odd situation where `git describe` insists on finding the\n> wrong tag. In my case, I tagged a branch, then merged it into another branch,\n> and now `git describe` in that other branch decides that it should emit a tag\n> name that's over 200 commits old rather than the one that's a single commit\n> away.\n> \n> % git --version\n> git version 1.7.4.31.g3f8c4\n> % git describe\n> build_1.2.2_applestore_1-203-g742967b\n> % git describe HEAD^2\n> build_1.2.2\n> \n> Is there any rational for why git-describe is opting for the much older\n> commit?\n\nMost likely, the situation outlined in this commit message applies to your\ncase:\n\nhttp://git.kernel.org/?p=git/git.git;a=commit;h=80dbae03\n\nThen what you observe is by design.\n\n-- Hannes\n"},{"id":"160680","messageId":"9FE24A31-F654-4F1D-B36B-28F506B79C63@sb.org","threadId":"26443","inReplyTo":"4D50EE88.8070005@viscovery.net","subject":"Re: Git describe finding wrong tag","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2011-02-08T07:23:15Z","receivedAt":"2011-02-08T07:23:15Z","isPatch":false,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On Feb 7, 2011, at 11:19 PM, Johannes Sixt wrote:\n\n> Am 2/8/2011 5:46, schrieb Kevin Ballard:\n>> I just encountered an odd situation where `git describe` insists on finding the\n>> wrong tag. In my case, I tagged a branch, then merged it into another branch,\n>> and now `git describe` in that other branch decides that it should emit a tag\n>> name that's over 200 commits old rather than the one that's a single commit\n>> away.\n>> \n>> % git --version\n>> git version 1.7.4.31.g3f8c4\n>> % git describe\n>> build_1.2.2_applestore_1-203-g742967b\n>> % git describe HEAD^2\n>> build_1.2.2\n>> \n>> Is there any rational for why git-describe is opting for the much older\n>> commit?\n> \n> Most likely, the situation outlined in this commit message applies to your\n> case:\n> \n> http://git.kernel.org/?p=git/git.git;a=commit;h=80dbae03\n> \n> Then what you observe is by design.\n\nYou are right, that does explain it. It feels rather odd that I can merge in\na tagged commit and have `git describe` not then use that tag, but I suppose\nthe new behavior makes sense.\n\nThanks for the explanation.\n\n-Kevin Ballard"}]}