submodule update: narrow scope of local variable
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6cbf454a2e
commit
341238ebc4
@ -589,7 +589,6 @@ cmd_update()
|
|||||||
|
|
||||||
name=$(git submodule--helper name "$sm_path") || exit
|
name=$(git submodule--helper name "$sm_path") || exit
|
||||||
url=$(git config submodule."$name".url)
|
url=$(git config submodule."$name".url)
|
||||||
branch=$(get_submodule_config "$name" branch master)
|
|
||||||
if ! test -z "$update"
|
if ! test -z "$update"
|
||||||
then
|
then
|
||||||
update_module=$update
|
update_module=$update
|
||||||
@ -615,6 +614,7 @@ cmd_update()
|
|||||||
|
|
||||||
if test -n "$remote"
|
if test -n "$remote"
|
||||||
then
|
then
|
||||||
|
branch=$(get_submodule_config "$name" branch master)
|
||||||
if test -z "$nofetch"
|
if test -z "$nofetch"
|
||||||
then
|
then
|
||||||
# Fetch remote before determining tracking $sha1
|
# Fetch remote before determining tracking $sha1
|
||||||
|
Loading…
Reference in New Issue
Block a user