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 17, 2022, 17:02 UTC
Message-ID
<Y02KtjAUGSPqffvB@coredump.intra.peff.net>
In-Reply-To
<xmqqwn904sof.fsf@gitster.g>
On Sat, Oct 15, 2022 at 03:40:16PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> If one likes the output from "submodule--helper list" so much, I
> think your "ls-files" above should be the closest.  There seems to
> have existed some logic to squash unmerged entries down to a single
> one, too (git-submodule.sh in Git 2.0.0 era has a module_list shell
> function that shows what "helper list" should be doing), though.

Ah, good digging. I briefly looked at the patch removing the submodule--helper version, saw the word "active", and assumed it was checking that. On closer inspection, it is just the global "active_nr" for iterating over the index. ;)

So yeah, using "ls-files" is a suitable replacement for Jonas's original complaint. I'll leave it up to folks more interested and knowledgeable on submodules to discuss whether there ought to be a listing command that's more aware of gitmodules, populated fields, active flags, etc.

-Peff
Previous: Junio C HamanoNext: Matti Möll
Message 8 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.