Re: [PATCH v4] submodule: fetch missing objects from default remote
- From
Nasser Grainawi <nasser.grainawi@oss.qualcomm.com>
- Date
- Mar 3, 2026, 19:00 UTC
- Message-ID
- <CAFcKa=-ei+93P_Rp+2eKWW+43aSyg_hxHb9K6X5KmXEcS1VGvg@mail.gmail.com>
- In-Reply-To
- <xmqqfr6hfyqq.fsf@gitster.g>
On Mon, Mar 2, 2026 at 7:11 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 35 quoted lines
> > Nasser Grainawi <nasser.grainawi@oss.qualcomm.com> 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 <nasser.grainawi@oss.qualcomm.com> > > --- > > I removed Jacob Keller's Reviewed-By since there are more significant > > edits to the tests in v4 that they haven't reviewed. > > > > v4 includes fixes for the issues Junio patched in seen and I confirmed > > it merges cleanly to seen (with v3 reverted) as well as next and passes > > tests. > > The tests in this patch seems to be broken. I didn't notice it > before merging it to 'seen', so tonight's integration CI is expected > to fail at the tip of 'seen'. > > > > *** prove (shell & unit tests) *** > [18:10:13] t5526-fetch-submodules.sh .. 39/? > error: bug in the test script: test_when_finished does nothing in a subshell
And this is how I learned about TEST_SHELL_PATH. My Ubuntu machine has sh linked to dash, so these errors weren't showing up for me.
Also, I just noticed I have $pwd in a couple places and need that to be $(pwd), so I will send both those fixes.