Re: [RFC/PATCH] ls-files: adding support for submodules
- From
Jeff King <peff@peff.net>
- Date
- Sep 12, 2016, 00:52 UTC
- Message-ID
- <20160912005229.6njhgfq7h6cb34s4@sigill.intra.peff.net>
- In-Reply-To
- <20160912005106.fj7adhmtfklv4vir@sigill.intra.peff.net>
On Sun, Sep 11, 2016 at 08:51:06PM -0400, Jeff King wrote:
Show 18 quoted lines
> On Sun, Sep 11, 2016 at 03:10:13PM -0700, Junio C Hamano wrote: > > > So a "ls-files" that is done internally in the end-user facing "git > > grep --recurse-submodules" needs to be run _without_ recursing > > itself at least once to learn "lib/" is a submodule. A flat "here > > are everything we have" does not sound like a good building block. > > I do not use submodules myself, but I could imagine that you may have > scripts outside of git that do not care about the submodule divisions at > all, and would be happy with the flat block. E.g., our "make tags" > target uses "git ls-files" so find all of the source files. I could > imagine projects with submodules that would want to do so recursively (I > could also imagine projects that do _not_ want to do so; it would depend > on your workflow and how tightly bound the submodules are). Another > plausible example would be something grep-like that has features > git-grep does not (I don't use "ack", but perhaps "git ls-files > --recurse-submodules -z | xargs --null ack ..." is something people > would want to do).
None of that negates your point, btw, which is that this does not seem like a great building block for "git grep --recurse-submodules". Just that it seems plausible to me that people could find recursive "ls-files" useful on its own.
-Peff