threads / discuss / 21668

Using `git tag -l` to get non-matching tags

Subject: Using `git tag -l` to get non-matching tags

## tl;dr

2 messages between Nov 19, 2009 and Nov 19, 2009.

replies: 1people: 2as markdown or json

Tim Visher· Nov 19, 2009, 17:49 UTC · lore
Hello Everyone,

I'm trying to use `git tag -l` to get non-matching tags. I can't find anywhere in the documentation describing what is allowed in the tag pattern. Brief testing leads me to believe that it's only basic bash like pattern support.

Thoughts?
-- 
In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
Junio C Hamano· Nov 19, 2009, 18:18 UTC · re: Tim Visher · lore

Re: Using `git tag -l` to get non-matching tags

Tim Visher <tim.visher@gmail.com> writes:
> I'm trying to use `git tag -l` to get non-matching tags.  I can't find
> anywhere in the documentation describing what is allowed in the tag
> pattern.

As a general guideline, refs are matched using glob not regexp and given to fnmatch(3).

Who are you in your first sentence?

If you are an end user typing from the terminal trying to list tags excluding some, the answer would be "piping to 'grep -v'".

If you are writing a tool that uses git, the tool uses a part of tag namespace for its own use, and the tool is trying to enumerate end-user tags by excluding the ones it uses for its own use, then the answer would be "do not use 'git tag' in Porcelain---use 'git for-each-ref' and filter its output yourself".

← back to recent threads