]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: use submodule_from_path in set-{url,branch}
authorJan Alexander Steffens (heftig) <heftig@archlinux.org>
Tue, 3 Oct 2023 18:50:42 +0000 (20:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Oct 2023 22:30:42 +0000 (15:30 -0700)
commit6327085aa027b7d5936912bed596a3cf86953439
treeb28bfc87e756914234f5f584991ada0916fd5f60
parentd0e8084c65cbf949038ae4cc344ac2c2efd77415
submodule--helper: use submodule_from_path in set-{url,branch}

The commands need a path to a submodule but treated it as the name when
modifying the .gitmodules file, leading to confusion when a submodule's
name does not match its path.

Because calling submodule_from_path initializes the submodule cache, we
need to manually trigger a reread before syncing, as the cache is
missing the config change we just made.

Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c