{"thread":{"id":"11269","subject":"git describe candidate filtering","startedAt":"2007-12-13T05:25:36Z","lastAt":"2007-12-13T06:12:03Z","messageCount":3,"participants":["Eric Blake","Shawn O. Pearce","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"62981","messageId":"4760C250.5080103@byu.net","threadId":"11269","inReplyTo":null,"subject":"git describe candidate filtering","fromName":"Eric Blake","fromEmail":"ebb9@byu.net","sentAt":"2007-12-13T05:25:36Z","receivedAt":"2007-12-13T05:25:36Z","isPatch":false,"sender":{"key":"eblake@redhat.com","avatar":"https://avatars.githubusercontent.com/u/32933908?v=4"},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nWould it be possible to add an option to git-describe that limits the\ncandidate tags to those matching a glob pattern or regular expression?\nI've got a repository imported from CVS which has a number of less\ninteresting tags for events such as branch creation, but I'm only\ninterested in describing the current commit relative to tags matching\nv[0-9]\\.[0-9]*, rather than the closest tag of any spelling.\n\n- --\nDon't work too hard, make some time for fun as well!\n\nEric Blake             ebb9@byu.net\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.5 (Cygwin)\nComment: Public key at home.comcast.net/~ericblake/eblake.gpg\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org\n\niD8DBQFHYMJQ84KuGfSFAYARAsd8AKCwuCZsxZBcV3nd849Saxvch/OZiACfagTe\nmitsZEVhXy7hyBg0KALQG0o=\n=Qq8n\n-----END PGP SIGNATURE-----\n"},{"id":"62983","messageId":"20071213055746.GV14735@spearce.org","threadId":"11269","inReplyTo":"4760C250.5080103@byu.net","subject":"Re: git describe candidate filtering","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-12-13T05:57:46Z","receivedAt":"2007-12-13T05:57:46Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Eric Blake <ebb9@byu.net> wrote:\n> Would it be possible to add an option to git-describe that limits the\n> candidate tags to those matching a glob pattern or regular expression?\n> I've got a repository imported from CVS which has a number of less\n> interesting tags for events such as branch creation, but I'm only\n> interested in describing the current commit relative to tags matching\n> v[0-9]\\.[0-9]*, rather than the closest tag of any spelling.\n\nSure, it shouldn't be too difficult, just need to alter the get_name()\nfunction to add the item with add_to_known_names() only if it matches\nthe pattern.  Take a look at builtin-describe.c around line 74...\n\nWe only match things that were \"added\".  So if you don't add a tag\nvia add_to_known_names() then git-describe won't return it.\n\nHowever that's only true for the standard case; for --contains its\na different story as we are actually passing everything to name-rev.\n\n-- \nShawn.\n"},{"id":"62984","messageId":"7vodcv3yz0.fsf@gitster.siamese.dyndns.org","threadId":"11269","inReplyTo":"20071213055746.GV14735@spearce.org","subject":"Re: git describe candidate filtering","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-13T06:12:03Z","receivedAt":"2007-12-13T06:12:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> We only match things that were \"added\".  So if you don't add a tag\n> via add_to_known_names() then git-describe won't return it.\n>\n> However that's only true for the standard case; for --contains its\n> a different story as we are actually passing everything to name-rev.\n\nA good news is that name-rev is supposed to respect the name limiter.\n"}]}