Re: git ls-files wildcard behavior considered harmful

2015-03-30 Thread Duy Nguyen
On Tue, Mar 31, 2015 at 6:36 AM, Joey Hess wrote: > Duy Nguyen wrote: >> You can do "git --literal-pathspecs ls-files ..." or set >> GIT_LITERAL_PATHSPECS. > > Thanks! --literal-pathspecs does allow getting around this. > > Now I'm wondering what other parts of plumbing might be doing globbing >

Re: git ls-files wildcard behavior considered harmful

2015-03-30 Thread Jeff King
On Mon, Mar 30, 2015 at 07:36:14PM -0400, Joey Hess wrote: > Duy Nguyen wrote: > > You can do "git --literal-pathspecs ls-files ..." or set > > GIT_LITERAL_PATHSPECS. > > Thanks! --literal-pathspecs does allow getting around this. > > Now I'm wondering what other parts of plumbing might be doin

Re: git ls-files wildcard behavior considered harmful

2015-03-30 Thread Joey Hess
Duy Nguyen wrote: > You can do "git --literal-pathspecs ls-files ..." or set > GIT_LITERAL_PATHSPECS. Thanks! --literal-pathspecs does allow getting around this. Now I'm wondering what other parts of plumbing might be doing globbing that I did not anticipate. Maybe I should set the environment v

Re: git ls-files wildcard behavior considered harmful

2015-03-30 Thread Jonathan Nieder
Hi Joey, Joey Hess wrote: > Since I wanted to avoid this wildcard expension, I tried slash-escaping > the wildcard characters. This works: > > joey@darkstar:~/tmp/aaa>git ls-files 'foo\*bar' > foo*bar Does 'git --noglob-pathspecs' help? Curious, Jonathan -- To unsubscribe from this list: send t

Re: git ls-files wildcard behavior considered harmful

2015-03-30 Thread Duy Nguyen
On Tue, Mar 31, 2015 at 6:04 AM, Joey Hess wrote: > I was very surprised to learn the other day that git ls-files 'foo*' > will expand wildcards (including character classes), in the absence of > expansion by the shell. (git version 2.1.4) > > joey@darkstar:~/tmp/aaa>git ls-files 'foo*bar' > foo*b

git ls-files wildcard behavior considered harmful

2015-03-30 Thread Joey Hess
I was very surprised to learn the other day that git ls-files 'foo*' will expand wildcards (including character classes), in the absence of expansion by the shell. (git version 2.1.4) joey@darkstar:~/tmp/aaa>git ls-files 'foo*bar' foo*bar foobazbar joey@darkstar:~/tmp/aaa>git ls-files '[abc]' [abc