Skip to content

Commit

Permalink
Merge branch 'fp/submodule-checkout-mode'
Browse files Browse the repository at this point in the history
"submodule.*.update=checkout", when propagated from .gitmodules to
.git/config, turned into a "submodule.*.update=none", which did not
make much sense.

* fp/submodule-checkout-mode:
  git-submodule.sh: 'checkout' is a valid update mode
  • Loading branch information
gitster committed Jan 17, 2014
2 parents 92251b1 + efa8fd7 commit 1aeb10a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ cmd_init()
test -z "$(git config submodule."$name".update)"
then
case "$upd" in
rebase | merge | none)
checkout | rebase | merge | none)
;; # known modes of updating
*)
echo >&2 "warning: unknown update mode '$upd' suggested for submodule '$name'"
Expand Down Expand Up @@ -805,6 +805,17 @@ cmd_update()
update_module=$update
else
update_module=$(git config submodule."$name".update)
case "$update_module" in
'')
;; # Unset update mode
checkout | rebase | merge | none)
;; # Known update modes
!*)
;; # Custom update command
*)
die "$(eval_gettext "Invalid update mode '$update_module' for submodule '$name'")"
;;
esac
fi

displaypath=$(relative_path "$prefix$sm_path")
Expand Down

0 comments on commit 1aeb10a

Please sign in to comment.