mirror of
https://github.com/git/git.git
synced 2024-11-17 14:34:49 +01:00
submodule: move update configuration variable further up
Lets always initialize the 'update_module' variable with the final value. This way we allow code which wants to check this configuration early to do so right in the beginning of cmd_update(). Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1421fd9df4
commit
817bac35f2
1 changed files with 7 additions and 6 deletions
|
@ -461,7 +461,13 @@ cmd_update()
|
|||
fi
|
||||
name=$(module_name "$path") || exit
|
||||
url=$(git config submodule."$name".url)
|
||||
update_module=$(git config submodule."$name".update)
|
||||
if ! test -z "$update"
|
||||
then
|
||||
update_module=$update
|
||||
else
|
||||
update_module=$(git config submodule."$name".update)
|
||||
fi
|
||||
|
||||
if test -z "$url"
|
||||
then
|
||||
# Only mention uninitialized submodules when its
|
||||
|
@ -483,11 +489,6 @@ Maybe you want to use 'update --init'?")"
|
|||
die "$(eval_gettext "Unable to find current revision in submodule path '\$path'")"
|
||||
fi
|
||||
|
||||
if ! test -z "$update"
|
||||
then
|
||||
update_module=$update
|
||||
fi
|
||||
|
||||
if test "$subsha1" != "$sha1"
|
||||
then
|
||||
subforce=$force
|
||||
|
|
Loading…
Reference in a new issue