diff options
author | Chris Packham <judge.packham@gmail.com> | 2013-07-03 21:02:02 +1200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-03 10:15:15 -0700 |
commit | 6cb5728c43f34a7348e128b44b80d00b9417cb19 (patch) | |
tree | 137cbeae5b61afee929c2674f6088a48748af1f8 /Documentation/git-submodule.txt | |
parent | d9857bfd4de097d662d40481664ef30577f120f5 (diff) | |
download | git-6cb5728c43f34a7348e128b44b80d00b9417cb19.tar.gz git-6cb5728c43f34a7348e128b44b80d00b9417cb19.tar.xz |
submodule update: allow custom command to update submodule working tree
Users can set submodule.$name.update to '!command' which will cause
'command' to be run instead of checkout/merge/rebase. This allows
the user finer-grained control over how the update is done.
The primary motivation for this was interoperability with stgit;
however being able to intercept the submodule update process may
prove useful for integrating with or extending other tools.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r-- | Documentation/git-submodule.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index e5767134b..2f18f7daf 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -159,7 +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 |