From: Phil Hord Date: Thu, 03 Mar 2011 03:44:09 GMT Subject: Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':' Message-ID: <4D6F0E89.4020200@cisco.com> In-Reply-To: <7vhbblcvl7.fsf@alter.siamese.dyndns.org> On 03/02/2011 11:53 AM, Junio C Hamano wrote: > Michael J Gruber 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