{"thread":{"id":"17303","subject":"[PATCH] git-describe documentation: --match pattern is glob","startedAt":"2009-01-22T16:21:53Z","lastAt":"2009-01-22T16:21:53Z","messageCount":1,"participants":["ecashin@coraid.com"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"101539","messageId":"dfa634dbd8def9e205bbe219217179ca@coraid.com","threadId":"17303","inReplyTo":null,"subject":"[PATCH] git-describe documentation: --match pattern is glob","fromName":"","fromEmail":"ecashin@coraid.com","sentAt":"2009-01-22T16:21:53Z","receivedAt":"2009-01-22T16:21:53Z","isPatch":true,"sender":{"key":"ecashin@coraid.com","avatar":null},"body":"I finally took a few minutes to figure out what kind of pattern\nspecification the \"--match\" option to git-describe expects.  I\nthink it would be helpful to mention it explicitly in the manpage\nso that trial and error isn't the only recourse for git-describe\nusers.\n\nIt seemed a bit weird to use \"torvalds@g5\" in the examples,\nbut I guess it's good to be consistent.\n\n\ncommit 0cbed245ca2812cb7708d9d97a8b5092a8b22b73\nAuthor: Ed L. Cashin <ecashin@coraid.com>\nDate:   Thu Jan 22 11:09:22 2009 -0500\n\n    mention what kind of pattern the --match option expects\n    \n    It wasn't clear whether the --match option expects a regular\n    expression or some other kind of pattern specification.\n\ndiff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt\nindex a99b4ef..92a7995 100644\n--- a/Documentation/git-describe.txt\n+++ b/Documentation/git-describe.txt\n@@ -73,7 +73,8 @@ OPTIONS\n \n --match <pattern>::\n \tOnly consider tags matching the given pattern (can be used to avoid\n-\tleaking private tags made from the repository).\n+\tleaking private tags made from the repository).  The pattern\n+\tsyntax is similar to shell globbing.\n \n --always::\n \tShow uniquely abbreviated commit object as fallback.\n@@ -117,6 +118,21 @@ closest tagname without any suffix:\n \t[torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2\n \ttags/v1.0.0\n \n+When multiple trees are being tracked, --match can specify which tags\n+are interesting.  I see that a certain commit appeared first in a\n+linux-next release, because I am tracking the linux-next tree as a\n+remote:\n+\n+\t[torvalds@g5 linux-2.6]$ git describe --contains 9514dff9\n+\tnext-20080623~13^2~72\n+\n+But since I really want to know the first mainline release containing\n+the commit, I use --match to get those results:\n+\n+\t[torvalds@g5 linux-2.6]$ git describe --contains --match 'v*' 9514dff9\n+\tv2.6.27-rc1~1103^2~85\n+\n+\n SEARCH STRATEGY\n ---------------\n \n"}]}