Re: [PATCH v2] rev-parse --namespace
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:03
Ilari Liusvaara [off-list ref] writes:
On Tue, Jan 19, 2010 at 10:46:51PM +0100, Thomas Rast wrote:quoted
Ilari Liusvaara wrote:quoted
Eh, remind me what commands take refs and shell-glob them? The only 'globbing' of refs I'm aware of is in refspecs, and that definitely isn't shell globbing...fetchspecs?Ah, found one: 'ls-remote'. Documentation of that doesn't say what format patterns are in... Any others?
What I gave you was "Please don't use regexp, because matching refs with
fnmatch() is the design guideline we follow". It was not "please follow
the precedence of existing commands". IOW, even if there was no command
that matched refs with globs, it is not an excuse to use regexp. You
didn't even have to find any single example. But here are some others, if
you are interested.
$ git grep fnmatch builtin-{for-each-ref,reflog,name-rev,show-branch,tag}.c
You find the design guideline to make refs behave as paths in a lot more
fundamental places, such as "if you have 'master' branch, you don't have
master/foo branch", and "you cannot use '?' in ref name because it is a
special character in globbing".