Merge branch 'mp/push-pushoption-config'
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:30 +0000 (14:24 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:30 +0000 (14:24 +0900)
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

1  2 
Documentation/config.txt
diff --combined Documentation/config.txt
index 5642defb8cf6a282080e6703df68029686a54690,78ded635f2bf3f7f2ef3de804963f4ba6fe35f19..5f0d62753d09ddd57eb580dd014b403a1f46d26d
@@@ -351,9 -351,6 +351,9 @@@ advice.*:
        addEmbeddedRepo::
                Advice on what to do when you've accidentally added one
                git repo inside of another.
 +      ignoredHook::
 +              Advice shown if an hook is ignored because the hook is not
 +              set as executable.
  --
  
  core.fileMode::
@@@ -2624,6 -2621,35 +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'