diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-06 14:24:30 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-06 14:24:30 +0900 |
commit | c692fe2c1e3b0104c5573e2ec3ae62ba2711c4e6 (patch) | |
tree | 617a3b5248c6e7f14596b292b266c0aaac7cd2d3 /Documentation | |
parent | b4d658b501a37d14a8542b98b59817ed59977388 (diff) | |
parent | d8052750c5fdd53cb5a664a18ce9d78dbedb22ae (diff) | |
download | git-c692fe2c1e3b0104c5573e2ec3ae62ba2711c4e6.tar.gz git-c692fe2c1e3b0104c5573e2ec3ae62ba2711c4e6.tar.xz |
Merge branch 'mp/push-pushoption-config'
The "--push-option=<string>" option to "git push" now defaults to a
list of strings configured via push.pushOption variable.
* mp/push-pushoption-config:
builtin/push.c: add push.pushOption config
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 29 | ||||
-rw-r--r-- | Documentation/git-push.txt | 10 |
2 files changed, 37 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 5642defb8..5f0d62753 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -2624,6 +2624,35 @@ push.gpgSign:: override a value from a lower-priority config file. An explicit command-line flag always overrides this config option. +push.pushOption:: + When no `--push-option=<option>` argument is given from the + command line, `git push` behaves as if each <value> of + this variable is given as `--push-option=<value>`. ++ +This is a multi-valued variable, and an empty value can be used in a +higher priority configuration file (e.g. `.git/config` in a +repository) to clear the values inherited from a lower priority +configuration files (e.g. `$HOME/.gitconfig`). ++ +-- + +Example: + +/etc/gitconfig + push.pushoption = a + push.pushoption = b + +~/.gitconfig + push.pushoption = c + +repo/.git/config + push.pushoption = + push.pushoption = b + +This will result in only b (a and c are cleared). + +-- + push.recurseSubmodules:: Make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch. If the value is 'check' diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 3e76e99f3..5b08302fc 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -156,11 +156,17 @@ already exists on the remote side. Either all refs are updated, or on error, no refs are updated. If the server does not support atomic pushes the push will fail. --o:: ---push-option:: +-o <option>:: +--push-option=<option>:: Transmit the given string to the server, which passes them to the pre-receive as well as the post-receive hook. The given string must not contain a NUL or LF character. + When multiple `--push-option=<option>` are given, they are + all sent to the other side in the order listed on the + command line. + When no `--push-option=<option>` is given from the command + line, the values of configuration variable `push.pushOption` + are used instead. --receive-pack=<git-receive-pack>:: --exec=<git-receive-pack>:: |