diff options
author | Stefan Beller <sbeller@google.com> | 2016-07-29 03:44:05 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-02 00:41:51 +0300 |
commit | 341238ebc4c95a351db2e047a0ca2340766b48e8 (patch) | |
tree | 0ce85154e580eaf91c84a5774d8ec96c781f9a6e | |
parent | 6cbf454a2eaa016efff04bd696dc1ec24b515c11 (diff) |
submodule update: narrow scope of local variable
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-submodule.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |