submodule update: make use of the existing fetch_in_submodule function

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2016-05-25 15:00:04 -07:00 committed by Junio C Hamano
parent 3a0f269e7c
commit a87bcd6d47

View File

@ -640,7 +640,7 @@ cmd_update()
if test -z "$nofetch" if test -z "$nofetch"
then then
# Fetch remote before determining tracking $sha1 # Fetch remote before determining tracking $sha1
(sanitize_submodule_env; cd "$sm_path" && git-fetch) || fetch_in_submodule "$sm_path" ||
die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")" die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")"
fi fi
remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote) remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote)