submodule sync: use submodule--helper is-active
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e7849a9677
commit
25b31f1b73
@ -1089,14 +1089,14 @@ cmd_sync()
|
|||||||
while read mode sha1 stage sm_path
|
while read mode sha1 stage sm_path
|
||||||
do
|
do
|
||||||
die_if_unmatched "$mode" "$sha1"
|
die_if_unmatched "$mode" "$sha1"
|
||||||
name=$(git submodule--helper name "$sm_path")
|
|
||||||
|
|
||||||
# skip inactive submodules
|
# skip inactive submodules
|
||||||
if ! git config "submodule.$name.url" >/dev/null 2>/dev/null
|
if ! git submodule--helper is-active "$sm_path"
|
||||||
then
|
then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
name=$(git submodule--helper name "$sm_path")
|
||||||
url=$(git config -f .gitmodules --get submodule."$name".url)
|
url=$(git config -f .gitmodules --get submodule."$name".url)
|
||||||
|
|
||||||
# Possibly a url relative to parent
|
# Possibly a url relative to parent
|
||||||
|
Reference in New Issue
Block a user