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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 23, 2026, 23:26 UTC
Message-ID
<xmqq4iobhpvg.fsf@gitster.g>
In-Reply-To
<20260122152722.866341-1-nasser.grainawi@oss.qualcomm.com>
Nasser Grainawi <nasser.grainawi@oss.qualcomm.com> writes:
Show 18 quoted lines
> diff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh
> index 45f384dd32..faafe31409 100755
> --- a/t/t5572-pull-submodule.sh
> +++ b/t/t5572-pull-submodule.sh
> @@ -257,7 +257,26 @@ test_expect_success 'fetch submodule remote of different name from superproject'
>  	git -C a-submodule reset --hard HEAD^^ &&
>  
>  	git -C child pull --no-recurse-submodules &&
> -	git -C child submodule update
> +	git -C child submodule update &&
> +	test_path_is_file child/a-submodule/moreecho.t
> +'
> +
> +test_expect_success 'fetch submodule remote of different non-origin name from superproject' '
> +	git -C child/a-submodule remote rename origin o2 &&
> +
> +	# Create commit that is unreachable from current master branch
> +	git -C a-submodule checkout -b newmain2 master^ &&

This test assumes that the first branch created by default is 'master', which will break in one of the CI jobs:

  https://github.com/git/git/actions/runs/21304166518/job/61328461844#step:9:1942

If we are assuming that we are on the default branch when this "Create commit" step runs, perhaps you can replace your "master^" with "HEAD^" to achieve the same effect in a way that works regardless of what the default branch is called?

Previous: Junio C HamanoNext: Junio C Hamano
Message 17 of 36 in “Fetch missing submodule objects from default remote”
  1. Fetch missing submodule objects from default remoteNasser Grainawi, Jan 12, 2026
  2. Jacob KellerJan 13, 2026
  3. Ben KnobleJan 13, 2026
  4. Nasser GrainawiJan 13, 2026
  5. D. Ben KnobleJan 14, 2026
  6. Junio C HamanoJan 14, 2026
  7. Junio C HamanoJan 14, 2026
  8. Nasser GrainawiJan 14, 2026
  9. submodule: fetch missing objects from default remoteNasser Grainawi, Jan 14, 2026
  10. Ben KnobleJan 14, 2026
  11. Nasser GrainawiJan 21, 2026
  12. submodule: fetch missing objects from default remoteNasser Grainawi, Jan 22, 2026
  13. Junio C HamanoJan 22, 2026
  14. Jacob KellerJan 22, 2026
  15. Junio C HamanoJan 22, 2026
  16. Junio C HamanoJan 22, 2026
  17. Junio C HamanoJan 23, 2026
  18. Junio C HamanoJan 24, 2026
  19. Junio C HamanoFeb 20, 2026
  20. Junio C HamanoFeb 25, 2026
  21. Nasser GrainawiFeb 27, 2026
  22. Nasser GrainawiFeb 27, 2026
  23. submodule: fetch missing objects from default remoteNasser Grainawi, Mar 1, 2026
  24. Jacob KellerMar 2, 2026
  25. Jacob KellerMar 2, 2026
  26. Junio C HamanoMar 2, 2026
  27. Junio C HamanoMar 3, 2026
  28. Nasser GrainawiMar 3, 2026
  29. Nasser GrainawiMar 3, 2026
  30. Junio C HamanoMar 3, 2026
  31. submodule: fetch missing objects from default remoteNasser Grainawi, Mar 3, 2026
  32. Ramsay JonesMar 3, 2026
  33. Junio C HamanoMar 3, 2026
  34. Nasser GrainawiMar 3, 2026
  35. submodule: fetch missing objects from default remoteNasser Grainawi, Mar 3, 2026
  36. Junio C HamanoMar 9, 2026

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.