Re: git ls-files wildcard behavior considered harmful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 31, 2015 at 6:36 AM, Joey Hess <id@xxxxxxxxxx> 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
> that I did not anticipate. Maybe I should set the environment variable
> so I don't need to worry about it..

We're just a bit sloppy in documentation. ls-files learned about
wildcards since 56fc510 ([PATCH] git-ls-files: generalized pathspecs -
2005-08-21). Two months later, git-ls-files.txt is updated to say
"<file>" (which is not entirely correct even if we ignore wildcards,
ls-files can take directories as well). With latest git, I think only
git-mv and git-read-tree go with plain paths. It's probably best to
set GIT_LITERAL_PATHSPECS for scripting like Jeff said.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]