git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git submodule set-url does not sync when name != path
@ 2023-07-24  4:21 Jan Alexander Steffens (heftig)
  2023-09-09 22:26 ` Bug: git submodule set-url does not handle name != path correctly Jan Alexander Steffens (heftig)
  0 siblings, 1 reply; 19+ messages in thread
From: Jan Alexander Steffens (heftig) @ 2023-07-24  4:21 UTC (permalink / raw)
  To: git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I've encountered this problem with the flatpak-builder repository:

https://github.com/flatpak/flatpak-builder/blob/main/.gitmodules

[submodule "libglnx"]
	path = subprojects/libglnx
	url = https://gitlab.gnome.org/GNOME/libglnx.git
[submodule "debugedit"]
	path = subprojects/debugedit
	url = https://sourceware.org/git/debugedit.git

After 'git submodule init', using 'git submodule set-url libglnx foo'
successfully modifies .gitmodules but does not touch .git/config.
However, a subsequent 'git submodule sync' does sync the modified url
to the local config.

I've investigated a bit and it seems 'git submodule set-url' calls
sync_submodule with "libglnx" as the path, which does not work, while
'git submodule sync' calls it with "subprojects/libglnx" as the path,
which does work.

Greetings,
Jan
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQQGaHodnU+rCLUP2Ss7lKgOUKR3xwUCZL38OhUcaGVmdGlnQGFy
Y2hsaW51eC5vcmcACgkQO5SoDlCkd8cfsAD+M6POceTxAkFpnnmAH7j3RYLBEjFP
w4kzY3U0UPVMU3wBAIPRBGjiwGFp/ws/iMeGQKif1E0ElqcxEbFAQ36HytIG
=4OVq
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-11-22  9:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24  4:21 git submodule set-url does not sync when name != path Jan Alexander Steffens (heftig)
2023-09-09 22:26 ` Bug: git submodule set-url does not handle name != path correctly Jan Alexander Steffens (heftig)
2023-10-03 18:50   ` [PATCH 1/6] submodule--helper: use submodule_from_path in set-{url,branch} Jan Alexander Steffens (heftig)
2023-10-03 18:50     ` [PATCH 2/6] submodule--helper: return error from set-url when modifying failed Jan Alexander Steffens (heftig)
2023-10-03 23:10       ` Junio C Hamano
2023-10-03 18:50     ` [PATCH 3/6] t7419: Actually test the branch switching Jan Alexander Steffens (heftig)
2023-10-04  0:20       ` Junio C Hamano
2023-10-03 18:50     ` [PATCH 4/6] t7419, t7420: Use test_cmp_config instead of grepping .gitmodules Jan Alexander Steffens (heftig)
2023-10-03 18:50     ` [PATCH 5/6] t7419: Test that we correctly handle renamed submodules Jan Alexander Steffens (heftig)
2023-10-03 18:50     ` [PATCH 6/6] t7420: " Jan Alexander Steffens (heftig)
2023-10-04  1:10     ` [PATCH 1/6] submodule--helper: use submodule_from_path in set-{url,branch} Junio C Hamano
2023-11-21 20:32     ` [PATCH v2 " Jan Alexander Steffens (heftig)
2023-11-21 20:32       ` [PATCH v2 2/6] submodule--helper: return error from set-url when modifying failed Jan Alexander Steffens (heftig)
2023-11-21 20:32       ` [PATCH v2 3/6] t7419: actually test the branch switching Jan Alexander Steffens (heftig)
2023-11-21 20:32       ` [PATCH v2 4/6] t7419, t7420: use test_cmp_config instead of grepping .gitmodules Jan Alexander Steffens (heftig)
2023-11-21 20:32       ` [PATCH v2 5/6] t7419: test that we correctly handle renamed submodules Jan Alexander Steffens (heftig)
2023-11-21 20:32       ` [PATCH v2 6/6] t7420: " Jan Alexander Steffens (heftig)
2023-11-22  7:54       ` [PATCH v2 1/6] submodule--helper: use submodule_from_path in set-{url,branch} Junio C Hamano
2023-11-22  9:50         ` Jan Alexander Steffens (heftig)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).