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

Re: [RFC] The design of new pathspec features

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 29, 2013, 05:27 UTC
Message-ID
<CACsJy8BPhHJseDghWjCe1xK_KqSZOz1cfoOfPnTdex94qqrCzw@mail.gmail.com>
In-Reply-To
<7vpq0otw7y.fsf@alter.siamese.dyndns.org>
On Tue, Jan 29, 2013 at 12:05 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>> New way to specify long pathspec magic
>> ======================================
>>
>> While testing the pathspec magic code, I grow tired of quoting :(glob)
>> every time because '(' is the start of a new shell. Which is one of
>> the reasons I introduce --[no]glob-pathspecs. Still I'd like a way to
>> specify long pathspec magic without quoting.
>
> Is this a real issue, though?  Often interesting pathspecs do have
> shell globs in them and we have to quote them anyway.

:(icase) often won't (unless you combine with :(glob)). If we turn grep's --max-depth feature into pathspec magic (feasible, just not sure if it's actually useful), it won't need quoting either.

Even with :(glob), because of the complexity of the pathspec, it's less likely to match anything and be expanded by bash, so no quoting required.

>> How about making ":q/xxx/" an equivalence of ":(xxx)"?
>
> A moderately strong no from here.
-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “[RFC] The design of new pathspec features”
  1. Duy NguyenJan 29, 2013
  2. Junio C HamanoJan 29, 2013
  3. Duy NguyenJan 29, 2013
  4. Junio C HamanoJan 29, 2013
  5. Junio C HamanoJan 29, 2013
  6. Duy NguyenJan 29, 2013
  7. Junio C HamanoJan 29, 2013
  8. Duy NguyenJan 29, 2013
  9. Junio C HamanoJan 29, 2013
  10. Junio C HamanoJan 29, 2013

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.