diff options
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index e131760eec..a0caa16653 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -511,6 +511,7 @@ fetch_in_submodule () ( cmd_update() { # parse $args after "submodule ... update". + default_update="checkout" while test $# -ne 0 do case "$1" in @@ -552,6 +553,10 @@ cmd_update() --checkout) update="checkout" ;; + --default-update) + default_update="$2" + shift + ;; --recommend-shallow) recommend_shallow="--recommend-shallow" ;; @@ -619,7 +624,7 @@ cmd_update() update_module=$(git config submodule."$name".update) if test -z "$update_module" then - update_module="checkout" + update_module="$default_update" fi fi |