From: Junio C Hamano Date: Tue, 19 Jan 2010 22:36:49 GMT Subject: Re: [PATCH v2] rev-parse --namespace Message-ID: <7vd41590xq.fsf@alter.siamese.dyndns.org> In-Reply-To: <20100119221258.GA25210@Knoppix> Ilari Liusvaara writes: > On Tue, Jan 19, 2010 at 10:46:51PM +0100, Thomas Rast wrote: >> Ilari Liusvaara wrote: >> > >> > 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".