]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: migrate get_next_submodule to use repository structs
authorStefan Beller <sbeller@google.com>
Thu, 29 Nov 2018 00:27:54 +0000 (16:27 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Dec 2018 02:42:32 +0000 (11:42 +0900)
commit26f80ccfc15bb1e591b634173bdb7092da33da12
tree5558b56ef7128a00423101fc8b6107f194702197
parentd5498e087175ad7bbb0460a40cfb55cc3726226d
submodule: migrate get_next_submodule to use repository structs

We used to recurse into submodules, even if they were broken having
only an objects directory. The child process executed in the submodule
would fail though if the submodule was broken. This is tested via
"fetching submodule into a broken repository" in t5526.

This patch tightens the check upfront, such that we do not need
to spawn a child process to find out if the submodule is broken.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c