git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Request feature: –no-submodule

From
Taylor Blau <me@ttaylorr.com>
Date
Jun 3, 2021, 02:33 UTC
Message-ID
<YLg/dLqYFEqHZJUn@nand.local>
In-Reply-To
<xmqq8s3r7oma.fsf@gitster.g>
On Thu, Jun 03, 2021 at 09:55:57AM +0900, Junio C Hamano wrote:
Show 7 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> > In all honesty, though this seems like a niche request for ls-files to
> > fulfill, ls-files already has quite the collection of options, so I
> > wouldn't be sad to see it learn how to do this, too.
>
> I would be somewhat sad for two reasons.

Mmm, that's a convincing set of reasons to think that this is a bad idea. (And I was sort of on the fence about it anyway by posting the whole thing as a short diff instead of a polished patch).

> I wonder if the "attr" magic of the pathspec, that allows you to
> choose paths based on the attributes you set on them, is what the
> original requestor missed.

Maybe... but relying on the attr magic for this particular case would force the requester to set that attribute on all submodules in their project, and constantly keep that in-sync with their .gitmodules. So, it certainly make it easier to handle a request like "I don't care about ls-files telling me about any submodule(s) except these ones", but perhaps at the expense of some extra bookkeeping.

I might be missing something, though.

Thanks, Taylor

Previous: Junio C HamanoNext: Ilias Apostolou
Message 4 of 12 in “Request feature: –no-submodule”
  1. Ilias ApostolouJun 2, 2021
  2. Taylor BlauJun 2, 2021
  3. Junio C HamanoJun 3, 2021
  4. Taylor BlauJun 3, 2021
  5. Ilias ApostolouJun 3, 2021
  6. Junio C HamanoJun 3, 2021
  7. Junio C HamanoJun 3, 2021
  8. Jeff KingJun 3, 2021
  9. Junio C HamanoJun 3, 2021
  10. Jeff KingJun 4, 2021
  11. Junio C HamanoJun 4, 2021
  12. Ilias ApostolouJun 5, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.