public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: ecashin@coraid•com
To: git@vger•kernel.org
Cc: ecashin@coraid•com
Subject: [PATCH] git-describe documentation: --match pattern is glob
Date: Thu, 22 Jan 2009 11:21:53 -0500	[thread overview]
Message-ID: <dfa634dbd8def9e205bbe219217179ca@coraid.com> (raw)

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
 ---------------
 

                 reply	other threads:[~2009-01-22 16:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfa634dbd8def9e205bbe219217179ca@coraid.com \
    --to=ecashin@coraid$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox