From 341238ebc4c95a351db2e047a0ca2340766b48e8 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jul 2016 17:44:05 -0700 Subject: [PATCH] submodule update: narrow scope of local variable Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 40639ee231..41aff65fac 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -589,7 +589,6 @@ cmd_update() name=$(git submodule--helper name "$sm_path") || exit url=$(git config submodule."$name".url) - branch=$(get_submodule_config "$name" branch master) if ! test -z "$update" then update_module=$update @@ -615,6 +614,7 @@ cmd_update() if test -n "$remote" then + branch=$(get_submodule_config "$name" branch master) if test -z "$nofetch" then # Fetch remote before determining tracking $sha1 -- 2.11.4.GIT