X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-submodule.sh;h=e544dbc917b84dfe17597e90e9e48af5a1e5a196;hb=817bac35f24166e8b306ecef5283ed721068f113;hp=f46862f61b48a970f6ec24a9ae7624905ba3013a;hpb=1421fd9df4f1e3ed232bd1c683c6e264a464a41e;p=git.git diff --git a/git-submodule.sh b/git-submodule.sh index f46862f61..e544dbc91 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -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