Subject: Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'

From: Phil Hord <[email-masked]>
Date: Wed, 02 Mar 2011 22:44:09 -0500

On 03/02/2011 11:53 AM, Junio C Hamano wrote:
> Michael J Gruber <[email-masked]> writes:
>> [*] I keep forgetting that some people may have files whose names begin
>> with ":". They are ambiguous now already with "treeish pathspec"
>> commands, but not with "pathspec" commands. The latter would change.
> Just to make sure I understand that they have easy workarounds:
>
>  - If you have a path foo/:bar, you can say
>
>    git log master -- foo/:bar
>
>    because ':' signals the magic and gets stripped only when it is at the
>    beginning (i.e. not affecting foo/:bar); and
>
>  - For :boz at the root level, you can say
>
>    git log master -- '\:boz'
>
>    because the backslash in '\:boz' makes the colon not at the beginning and
>    the glob match sees '\:boz' and then matches '\:' with literal ':' at the
>    beginning of the pathname ":boz".

Easy workaround, maybe, but still a potential problem for unsuspecting
scripts.

  - I think this fails in a directory with :foo.c

    git log master -- *.c

  - Would this work, though?

    git log master -- "*.c"

Phil