diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-02 15:34:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-02 15:34:44 -0800 |
commit | be38bee862d628e29043b3f680580ceb24a6ba1e (patch) | |
tree | d848f433968754e5e9d1e6231614ab8db7cf31dc /git-submodule.sh | |
parent | d2446dfd7f3b3f8948142cfb07a0270e2497d93f (diff) | |
parent | 2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff) | |
download | git-be38bee862d628e29043b3f680580ceb24a6ba1e.tar.gz |
Sync with 1.8.4.5
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 896f1c9b82..66f5f752c5 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -612,11 +612,21 @@ cmd_init() fi # Copy "update" setting when it is not set yet - upd="$(git config -f .gitmodules submodule."$name".update)" - test -z "$upd" || - test -n "$(git config submodule."$name".update)" || - git config submodule."$name".update "$upd" || - die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")" + if upd="$(git config -f .gitmodules submodule."$name".update)" && + test -n "$upd" && + test -z "$(git config submodule."$name".update)" + then + case "$upd" in + rebase | merge | none) + ;; # known modes of updating + *) + echo >&2 "warning: unknown update mode '$upd' suggested for submodule '$name'" + upd=none + ;; + esac + git config submodule."$name".update "$upd" || + die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")" + fi done } |