aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5509-fetch-push-namespaces.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-09-01 01:18:14 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-02 09:16:25 -0700
commit86e16ed3a9fbf03bc8a5d4030177980193e30f57 (patch)
tree904e5e6f1200ddb4cc2dbf1996f057029988e201 /t/t5509-fetch-push-namespaces.sh
parentf5373deabd537daae3d7c34f6dfa4b62ed45be51 (diff)
downloadgit-86e16ed3a9fbf03bc8a5d4030177980193e30f57.tar.gz
submodule--helper: libify even more "die" paths for module_update()
As noted in a preceding commit the get_default_remote_submodule() and remote_submodule_branch() functions would invoke die(), and thus leave update_submodule() only partially lib-ified. We've addressed the former of those in a preceding commit, let's now address the latter. In addition to lib-ifying the function this fixes a potential (but obscure) segfault introduced by a logic error in 1012a5cbc3f (submodule--helper run-update-procedure: learn --remote, 2022-03-04): We were assuming that remote_submodule_branch() would always return non-NULL, but if the submodule_from_path() call in that function fails we'll return NULL. See its introduction in 92bbe7ccf1f (submodule--helper: add remote-branch helper, 2016-08-03). I.e. we'd previously have segfaulted in the xstrfmt() call in update_submodule() seen in the context. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5509-fetch-push-namespaces.sh')
0 files changed, 0 insertions, 0 deletions