Re: b5227d8 changes meaning of "ls-files -x 'pattern'"
- From
Sitaram Chamarty <sitaramc@gmail.com>
- Date
- Dec 17, 2009, 12:54 UTC
- Message-ID
- <2e24e5b90912170454x699ed26fm973e2fb7133b3bbf@mail.gmail.com>
- In-Reply-To
- <20091214182420.GA31594@coredump.intra.peff.net>
On Mon, Dec 14, 2009 at 11:55 PM, Jeff King <peff@peff.net> wrote:
> On Mon, Dec 14, 2009 at 09:21:06PM +0530, Sitaram Chamarty wrote:
Show 11 quoted lines
>> Before b5227d8, the following two commands would produce different >> outputs (say on git.git): >> >> git ls-files >> git ls-files -x '*.c' >> >> From b5227d8 onward, they produce the same output. The second command >> no longer excludes *.c files. >> >> I was unable to understand the commit message completely but it sounds >> like this was intentionally changed to do this.
> Yes, it was intentional. Excludes are about untracked files, not about > restricting parts of the index. The point of the change was to bring > "ls-files" in harmony with other parts of git. For example, prior to
OK; makes sense -- thanks for the explanation.
Show 6 quoted lines
> However, for your use case, I can see the utility of an option to limit > the output of ls-files for a particular invocation. It's just that "-x" > is tied into the excludes mechanism, which doesn't do that. > > I would not be opposed to a patch to add an option that means "exclude > these index entries from the output list." And for the sake of backwards
I rather doubt if my C skills extend that far these days; I'll figure out other ways of doing this if I need it :-)
Thanks again,
Sitaram