summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-15 10:28:44 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-15 10:28:44 -0700
commit3bb6149186ea6bed5e6fd7b2f830fb499a1a8658 (patch)
tree66ddba88750eec50e0418b55c3eb1450a3ed37da /git-submodule.sh
parent22fcbc420e7948cadb42c923810609a5e4b730a4 (diff)
parent6cb5728c43f34a7348e128b44b80d00b9417cb19 (diff)
downloadgit-3bb6149186ea6bed5e6fd7b2f830fb499a1a8658.tar.gz
Merge branch 'cp/submodule-custom-update'
In addition to the choice from "rebase, merge, or checkout-detach", allow a custom command to be used in "submodule update" to update the working tree of submodules. * cp/submodule-custom-update: submodule update: allow custom command to update submodule working tree
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 945e296d30..c87515de10 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -860,6 +860,12 @@ Maybe you want to use 'update --init'?")"
say_msg="$(eval_gettext "Submodule path '\$displaypath': merged in '\$sha1'")"
must_die_on_failure=yes
;;
+ !*)
+ command="${update_module#!}"
+ die_msg="$(eval_gettext "Execution of '\$command \$sha1' failed in submodule path '\$prefix\$sm_path'")"
+ say_msg="$(eval_gettext "Submodule path '\$prefix\$sm_path': '\$command \$sha1'")"
+ must_die_on_failure=yes
+ ;;
*)
command="git checkout $subforce -q"
die_msg="$(eval_gettext "Unable to checkout '\$sha1' in submodule path '\$displaypath'")"