Subject: Re: [PATCH v6] submodule: fetch missing objects from default remote

From: Junio C Hamano <[email-masked]>
Date: Mon, 09 Mar 2026 16:40:45 -0700

Nasser Grainawi <[email-masked]> writes:

> When be76c21282 (fetch: ensure submodule objects fetched, 2018-12-06)
> added support for fetching a missing submodule object by id, it
> hardcoded the remote name as "origin" and deferred anything more
> complicated for a later patch. Implement the NEEDSWORK item to remove
> the hardcoded assumption by adding and using a submodule helper subcmd
> 'get-default-remote'. Fixing this lets 'git fetch --recurse-submodules'
> succeed when the fetched commit(s) in the superproject trigger a
> submodule fetch, and that submodule's default remote name is not
> "origin".
>
> Add non-"origin" remote tests to t5526-fetch-submodules.sh and
> t5572-pull-submodule.sh demonstrating this works as expected and add
> dedicated tests for get-default-remote.
>
> Signed-off-by: Nasser Grainawi <[email-masked]>
> Reviewed-by: Jacob Keller <[email-masked]>
> ---
> Removed the fetch progress output comparison from the tests as the
> ordering is unpredictable.

This has gone quiet.  Shall we declare victory and mark the topic
for 'next'?

Thanks.