From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jeff King <peff@peff.net>
Cc: Florian Schmidt <flosch@nutanix.com>,
Derrick Stolee <stolee@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: Option for "git submodule foreach" to also run on the parent git?
Date: Mon, 9 Mar 2026 21:03:06 +0000 [thread overview]
Message-ID: <aa81ivufua5uJ4nb@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <20260309193001.GD309867@coredump.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]
On 2026-03-09 at 19:30:01, Jeff King wrote:
> These days we also have git-for-each-repo. It is primarily about running
> a command in a set of otherwise unrelated repos. But I wonder if:
>
> git for-each-repo --submodules do-this
>
> would be a natural fit as an alternative to "git submodule foreach"? And
> then you can imagine a "--current" option to discover the current repo
> and include it in the list. And then:
>
> git for-each-repo --submodules --current do-this
>
> would do what you want.
>
> I dunno. I do not have any need for this myself, but just thinking out
> loud.
I think this would be quite useful especially if it could operate on
submodules before the parent repository. My particular use case is with
the SHA-256/SHA-1 interoperability work, since that would allow people
to recursively convert submodules into interoperability mode and then
the main repository (which needs the submodule mappings first). This
seems like a thing others will want to do as well.
So while I'm not planning to work on this myself, I think this would be
a fantastic feature to add.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2026-03-09 21:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 12:52 Option for "git submodule foreach" to also run on the parent git? Florian Schmidt
2026-03-09 15:15 ` Junio C Hamano
2026-03-09 17:43 ` Florian Schmidt
2026-03-09 19:30 ` Jeff King
2026-03-09 21:03 ` brian m. carlson [this message]
2026-03-09 22:14 ` D. Ben Knoble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa81ivufua5uJ4nb@fruit.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=flosch@nutanix.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox