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

Re: "submodule foreach" much slower than removed "submodule--helper --list"

From
Jeff King <peff@peff.net>
Date
Oct 15, 2022, 18:23 UTC
Message-ID
<Y0r6iAv1OVUVYNGc@coredump.intra.peff.net>
In-Reply-To
<xmqqilkl54wp.fsf@gitster.g>
On Sat, Oct 15, 2022 at 11:16:06AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Yeah, that's not too surprising that it's slower. It's exec-ing a bunch
> > of shells to do that.
> > ...
> > I'm not sure if those are exactly equivalent, either. It looks like the
> > old code was probably respecting submodule active markers (though in my
> > test repo without the submodule actually checked out, it's still
> > reported). There is probably room for a user-facing "git submodule list"
> > command, but again, I don't really know enough about the space to say
> > what it should report.
> 
> We could mimic "find" and make "foreach" that has no action default
> to an equivalent of "echo" that is done internally without forking.

That would be reasonable to me, though I wonder what the output format should be. Just name, or name/oid? Once you start having options, you might as well just add a separate "git submodule list" that can take them.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 14 in “"submodule foreach" much slower than removed "submodule--helper --list"”
  1. Jonas BernoulliOct 15, 2022
  2. Jonas BernoulliOct 15, 2022
  3. Jeff KingOct 15, 2022
  4. Junio C HamanoOct 15, 2022
  5. Jeff KingOct 15, 2022
  6. Junio C HamanoOct 15, 2022
  7. Junio C HamanoOct 15, 2022
  8. Jeff KingOct 17, 2022
  9. Matti MöllNov 7, 2022
  10. Taylor BlauNov 8, 2022
  11. Ævar Arnfjörð BjarmasonNov 8, 2022
  12. Ævar Arnfjörð BjarmasonOct 17, 2022
  13. Jeff KingOct 17, 2022
  14. Jonas BernoulliOct 21, 2022

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.