public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] git-describe documentation: --match pattern is glob
@ 2009-01-22 16:21 ecashin
  0 siblings, 0 replies; only message in thread
From: ecashin @ 2009-01-22 16:21 UTC (permalink / raw)
  To: git; +Cc: ecashin

I finally took a few minutes to figure out what kind of pattern
specification the "--match" option to git-describe expects.  I
think it would be helpful to mention it explicitly in the manpage
so that trial and error isn't the only recourse for git-describe
users.

It seemed a bit weird to use "torvalds@g5" in the examples,
but I guess it's good to be consistent.


commit 0cbed245ca2812cb7708d9d97a8b5092a8b22b73
Author: Ed L. Cashin <ecashin@coraid•com>
Date:   Thu Jan 22 11:09:22 2009 -0500

    mention what kind of pattern the --match option expects
    
    It wasn't clear whether the --match option expects a regular
    expression or some other kind of pattern specification.

diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index a99b4ef..92a7995 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -73,7 +73,8 @@ OPTIONS
 
 --match <pattern>::
 	Only consider tags matching the given pattern (can be used to avoid
-	leaking private tags made from the repository).
+	leaking private tags made from the repository).  The pattern
+	syntax is similar to shell globbing.
 
 --always::
 	Show uniquely abbreviated commit object as fallback.
@@ -117,6 +118,21 @@ closest tagname without any suffix:
 	[torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2
 	tags/v1.0.0
 
+When multiple trees are being tracked, --match can specify which tags
+are interesting.  I see that a certain commit appeared first in a
+linux-next release, because I am tracking the linux-next tree as a
+remote:
+
+	[torvalds@g5 linux-2.6]$ git describe --contains 9514dff9
+	next-20080623~13^2~72
+
+But since I really want to know the first mainline release containing
+the commit, I use --match to get those results:
+
+	[torvalds@g5 linux-2.6]$ git describe --contains --match 'v*' 9514dff9
+	v2.6.27-rc1~1103^2~85
+
+
 SEARCH STRATEGY
 ---------------
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-22 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 16:21 [PATCH] git-describe documentation: --match pattern is glob ecashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox