From: Junio C Hamano <gitster@pobox.com>
To: Sergei Organov <osv@javad.com>
Cc: git@vger.kernel.org
Subject: Re: Surprising 'git-describe --all --match' behavior.
Date: Thu, 19 Jun 2014 10:20:46 -0700 [thread overview]
Message-ID: <xmqqr42khl3l.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <87ionxxbz8.fsf@osv.gnss.ru> (Sergei Organov's message of "Thu, 19 Jun 2014 17:31:07 +0400")
Sergei Organov <osv@javad.com> writes:
> Just playing with it, got some surprises:
>
> $ git --version
> git version 1.9.3
>
> $ git describe --all
> heads/v3.5
> $ git describe --all --match 'v*'
> tags/v3.5.6b2-4-gab4bf78
> $ git describe --all --match 'heads/v*'
> fatal: No names found, cannot describe anything.
I think
$ git describe --help
...
--match <pattern>
Only consider tags matching the given glob(7) pattern,
excluding the "refs/tags/" prefix. This can be used to
avoid leaking private tags from the repository.
...
is poorly phrased, especially its "excluding" part. What it wants
to say is "You give <pattern> but without refs/tags/, because the
program helpfully always prepend refs/tags/ to your pattern and
limit the output to those that match". Hence you gave 'v*' as
<pattern> and limited the output to those that match 'refs/tags/v*'
(or you gave 'heads/v*' and limited to 'refs/tags/heads/v*').
next prev parent reply other threads:[~2014-06-19 17:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 13:31 Surprising 'git-describe --all --match' behavior Sergei Organov
2014-06-19 17:20 ` Junio C Hamano [this message]
2014-06-19 18:58 ` Sergei Organov
2014-06-19 19:10 ` Junio C Hamano
2014-06-19 20:12 ` Sergei Organov
2014-06-19 21:50 ` Junio C Hamano
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=xmqqr42khl3l.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=osv@javad.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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