ls-files [Was: Re: Fwd: git status options feature suggestion]
- From
James Cloos <cloos@jhcloos.com>
- Date
- Oct 9, 2008, 21:23 UTC
- Message-ID
- <m3ej2p4g3r.fsf_-_@lugabout.jhcloos.org>
- In-Reply-To
- <alpine.DEB.1.00.0810091101230.22125@pacific.mpi-cbg.de.mpi-cbg.de>
>>>>> "Johannes" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> > How about "git ls-files -o"? >> >> doh... hadn't even heard of that command.
Johannes> Which is good! As ls-files is listed as plumbing. Johannes> Users should not need to call ls-files,
That is a bug, then. ls-files is one of the more important user-level commands in git.
It is vastly more efficient than find(1) or a --recursive call to grep(1).
Searching through a repository to find which file(s) define or use some function, struct, class or similar is a common occurance. Or to find which dir(s) contain(s) file(s) matching a given regexp. Or a number of other uses. (Tags might be useful if one does a lot of searching in a given repo, but grep is quicker for infrequent searches and the tags utils do not support all file types.)
ls-files is definitely dual-use.
-JimC
-- James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6