{"thread":{"id":"29563","subject":"git describe relative to a given tag pattern","startedAt":"2012-02-06T22:03:32Z","lastAt":"2012-02-06T22:18:06Z","messageCount":3,"participants":["Adam Mercer","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"184066","messageId":"CA+mfgz0VB9qMHHtoT76zCOiUaH=8egdMDrneQVRBug2waQsGAg@mail.gmail.com","threadId":"29563","inReplyTo":null,"subject":"git describe relative to a given tag pattern","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2012-02-06T22:03:32Z","receivedAt":"2012-02-06T22:03:32Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"Hi\n\nI'm trying to use git describe to describe the current status of my\ntree with respect a given tag, or more specifically the latest tag\nmatching a specific pattern.\n\nMy repository has the following tags:\n\n$ git tag -l lal-v*\nlal-v6.6.0\nlal-v6.6.0rc1\nlal-v6.6.0rc2\nlal-v6.6.1\nlal-v6.6.2\n$\n\nAnd I want git describe to use the latest of these tags, so looking at\nthe git describe man page it seems that the --match option can allow\nme to specify a pattern. This, however, doesn't seem to work:\n\n$ git describe --match=lal-v* HEAD\nfatal: No tags can describe 'cee13cbb25d0fa38f6e3bc6622bc751ebf35d2f0'.\nTry --always, or create some tags.\n$\n\nquoting the pattern has no effect, what am I doing wrong here?\n\nCheers\n\nAdam\n\nPS: I'm using git-1.7.9\n"},{"id":"184068","messageId":"7vhaz362b8.fsf@alter.siamese.dyndns.org","threadId":"29563","inReplyTo":"CA+mfgz0VB9qMHHtoT76zCOiUaH=8egdMDrneQVRBug2waQsGAg@mail.gmail.com","subject":"Re: git describe relative to a given tag pattern","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-06T22:10:19Z","receivedAt":"2012-02-06T22:10:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adam Mercer <ramercer@gmail.com> writes:\n\n> $ git describe --match=lal-v* HEAD\n> fatal: No tags can describe 'cee13cbb25d0fa38f6e3bc6622bc751ebf35d2f0'.\n\nPerhaps Git is correct and your HEAD is not a descendant of any tag whose\nname matches the pattern \"lal-v*\".\n\nHere is how people can mimic the situation:\n\n\t$ git checkout v1.7.6~20\n        $ git describe --match='v1.7.*' HEAD\n        v1.7.6-rc0-3-g6c92972\n        $ git describe --match='v1.7.[7-9]*' HEAD\n        fatal: No tags can describe '6c92972d7f5ab247a8cab5e4b88cb281bf201970'.\n\tTry --always, or create some tags.\n"},{"id":"184069","messageId":"CA+mfgz375mQUao8nF6dJYzd0_ui==25zKFj51fV5d9eEWrzc6Q@mail.gmail.com","threadId":"29563","inReplyTo":"7vhaz362b8.fsf@alter.siamese.dyndns.org","subject":"Re: git describe relative to a given tag pattern","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2012-02-06T22:18:06Z","receivedAt":"2012-02-06T22:18:06Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"On Mon, Feb 6, 2012 at 16:10, Junio C Hamano <gitster@pobox.com> wrote:\n\n> Perhaps Git is correct and your HEAD is not a descendant of any tag whose\n> name matches the pattern \"lal-v*\".\n\nThanks you're right, the tags I was trying to match are on a different\nbranch. Back to the drawing board for this script.\n\nCheers\n\nAdam\n"}]}