submodule sync: use submodule--helper is-active

Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Williams committed Mar 16, 2017 at 15:29 UTC 25b31f1b73331d3d9e90a72c34e514795e98c174
1 file changed +2 -2
git-submodule.sh
+2 -2
@@ -1089,14 +1089,14 @@ cmd_sync()
1089 while read mode sha1 stage sm_path
1090 do
1091 die_if_unmatched "$mode" "$sha1"
1092 - name=$(git submodule--helper name "$sm_path")
1092
1093 # skip inactive submodules
1095 - if ! git config "submodule.$name.url" >/dev/null 2>/dev/null
1094 + if ! git submodule--helper is-active "$sm_path"
1095 then
1096 continue
1097 fi
1098
1099 + name=$(git submodule--helper name "$sm_path")
1100 url=$(git config -f .gitmodules --get submodule."$name".url)
1101
1102 # Possibly a url relative to parent