submodule update: narrow scope of local variable
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Jul 28, 2016 at 17:44 UTC
341238ebc4c95a351db2e047a0ca2340766b48e8
1 file changed
+1
-1
git-submodule.sh
+1
-1
@@ -589,7 +589,6 @@ cmd_update()
589
590
name=$(git submodule--helper name "$sm_path") || exit
591
url=$(git config submodule."$name".url)
592
- branch=$(get_submodule_config "$name" branch master)
592
if ! test -z "$update"
593
then
594
update_module=$update
@@ -615,6 +614,7 @@ cmd_update()
614
615
if test -n "$remote"
616
then
617
+ branch=$(get_submodule_config "$name" branch master)
618
if test -z "$nofetch"
619
then
620
# Fetch remote before determining tracking $sha1