git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] rev-parse --namespace

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 19, 2010, 22:36 UTC
Message-ID
<7vd41590xq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100119221258.GA25210@Knoppix>
Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:
Show 13 quoted lines
> 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".

Previous: Ilari LiusvaaraNext: Johannes Sixt
Message 13 of 14 in “rev-parse --namespace”
  1. rev-parse --namespaceIlari Liusvaara, Jan 18, 2010
  2. Junio C HamanoJan 18, 2010
  3. rev-parse --namespaceIlari Liusvaara, Jan 18, 2010
  4. Jeff KingJan 19, 2010
  5. Fix errors in t6018Ilari Liusvaara, Jan 19, 2010
  6. Junio C HamanoJan 19, 2010
  7. Thomas RastJan 19, 2010
  8. Ilari LiusvaaraJan 19, 2010
  9. Junio C HamanoJan 19, 2010
  10. Ilari LiusvaaraJan 19, 2010
  11. Thomas RastJan 19, 2010
  12. Ilari LiusvaaraJan 19, 2010
  13. Junio C HamanoJan 19, 2010
  14. Johannes SixtJan 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.