From: Junio C Hamano Date: Mon, 15 Jul 2013 17:28:44 +0000 (-0700) Subject: Merge branch 'cp/submodule-custom-update' X-Git-Tag: v1.8.4-rc0~56 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3bb6149186ea6bed5e6fd7b2f830fb499a1a8658?ds=inline;hp=-c 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 --- 3bb6149186ea6bed5e6fd7b2f830fb499a1a8658 diff --combined Documentation/git-submodule.txt index bfff09062d,2f18f7daf8..134282700c --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@@ -159,7 -159,9 +159,9 @@@ update: This will make the submodules HEAD be detached unless `--rebase` or `--merge` is specified or the key `submodule.$name.update` is set to `rebase`, `merge` or `none`. `none` can be overridden by specifying - `--checkout`. + `--checkout`. Setting the key `submodule.$name.update` to `!command` + will cause `command` to be run. `command` can be any arbitrary shell + command that takes a single argument, namely the sha1 to update to. + If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the @@@ -262,7 -264,7 +264,7 @@@ OPTION --remote:: This option is only valid for the update command. Instead of using the superproject's recorded SHA-1 to update the submodule, use the - status of the submodule's remote tracking branch. The remote used + status of the submodule's remote-tracking branch. The remote used is branch's remote (`branch..remote`), defaulting to `origin`. The remote branch used defaults to `master`, but the branch name may be overridden by setting the `submodule..branch` option in