On Tue, Mar 31, 2015 at 6:04 AM, Joey Hess <i...@joeyh.name> 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*bar
> foobazbar
> joey@darkstar:~/tmp/aaa>git ls-files '[abc]'
> [abc]
> a
> b
>
> As far as I can see this behavior is not documented on the man page,
> except for a tiny mention in the --with-tree documentation, where
> it says "<file> (i.e. path pattern)".
>
> Since I wanted to avoid this wildcard expension, I tried slash-escaping
> the wildcard characters.

You can do "git --literal-pathspecs ls-files ..." or set GIT_LITERAL_PATHSPECS.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to