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

Re: [PATCH] pathspec: rename per-item field has_wildcard to use_wildcard

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 7, 2011, 13:00 UTC
Message-ID
<BANLkTinkdR4gg1=z-b4941Pppfsg+CgD-g@mail.gmail.com>
In-Reply-To
<4D9D9B60.4030404@drmicha.warpmail.net>

On Thu, Apr 7, 2011 at 6:09 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

> Junio, we're in rc phase ;)
He was excited. It's good, we may get this feature sooner :)
Show 14 quoted lines
>>  (2) Colon, open parenthesis, a comma separated list of words to name
>>      magic, close parenthesis, followed by the path, e.g. these are the
>>      long-hand counterparts to the examples in (1)
>>
>>      - ":(top)hello.c"
>>      - ":(top,noglob)hello.c"
>>      - ":(noglob,top)hello.c"
>>      - ":(noglob,top):hello.c"
>>      - ":()hello.c"
>>
>
> Do we need the parentheses? I guess we need them to have the magic start
> with a non-alpha, otherwise we could do with ":top,noglob:hello.c"
> (which I like but breaks those with a file named ":top:hello.c").

That has something to do with "easy to parse and catch error", I think. At the moment ":hello/:world" is interpreted as "hello/:world". Without parentheses, we need to look further for colon and may accidentally misinterpret it.

Show 6 quoted lines
> What about these:
>
> :/(noglob)hello.c
> :(top)!hello.c
>
> I.e. do we allow combinations?

I think we should. I don't like typing long pathspecs, just because only remember mnemonic for "top" and happen to need "noglob" too.

> It seems you accept to break people with files named ":(top)hello.c" but
> not those with files named ":top:hello.c". Which is OK if it's a
> conscious decision, of course.

At least once we agree on colon being the magic introducer and general rules, we can do these earlier in 1.7.x

 - warn people that ":hello.c" may change semantics in future
 - recommend to escape ("::hello.c" instead of ":hello.c")
-- 
Duy
Previous: Michael J GruberNext: Junio C Hamano
Message 6 of 11 in “pathspec: rename per-item field has_wildcard to use_wildcard”
  1. pathspec: rename per-item field has_wildcard to use_wildcardJunio C Hamano, Apr 5, 2011
  2. Nguyen Thai Ngoc DuyApr 6, 2011
  3. Junio C HamanoApr 6, 2011
  4. Junio C HamanoApr 6, 2011
  5. Michael J GruberApr 7, 2011
  6. Nguyen Thai Ngoc DuyApr 7, 2011
  7. Junio C HamanoApr 7, 2011
  8. Junio C HamanoApr 7, 2011
  9. Michael J GruberApr 8, 2011
  10. Junio C HamanoApr 8, 2011
  11. Nguyen Thai Ngoc DuyApr 7, 2011

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.