diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-25 15:25:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-25 15:25:39 -0700 |
commit | 6c430a647cb990fc856d328733fa59e1fafadb97 (patch) | |
tree | 09bf6873a1b13f2f0178d864a09a30f9fe3cf09a /Documentation/config | |
parent | 48794acc50f14394ca6c4f5092a4a498f409f350 (diff) | |
parent | d6edc189f6b3d8606150a52fd2c2fcd781b8550f (diff) | |
download | git-6c430a647cb990fc856d328733fa59e1fafadb97.tar.gz |
Merge branch 'jx/proc-receive-hook'
"git receive-pack" that accepts requests by "git push" learned to
outsource most of the ref updates to the new "proc-receive" hook.
* jx/proc-receive-hook:
doc: add documentation for the proc-receive hook
transport: parse report options for tracking refs
t5411: test updates of remote-tracking branches
receive-pack: new config receive.procReceiveRefs
doc: add document for capability report-status-v2
New capability "report-status-v2" for git-push
receive-pack: feed report options to post-receive
receive-pack: add new proc-receive hook
t5411: add basic test cases for proc-receive hook
transport: not report a non-head push as a branch
Diffstat (limited to 'Documentation/config')
-rw-r--r-- | Documentation/config/receive.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/config/receive.txt b/Documentation/config/receive.txt index 65f78aac37..85d5b5a3d2 100644 --- a/Documentation/config/receive.txt +++ b/Documentation/config/receive.txt @@ -114,6 +114,28 @@ receive.hideRefs:: An attempt to update or delete a hidden ref by `git push` is rejected. +receive.procReceiveRefs:: + This is a multi-valued variable that defines reference prefixes + to match the commands in `receive-pack`. Commands matching the + prefixes will be executed by an external hook "proc-receive", + instead of the internal `execute_commands` function. If this + variable is not defined, the "proc-receive" hook will never be + used, and all commands will be executed by the internal + `execute_commands` function. ++ +For example, if this variable is set to "refs/for", pushing to reference +such as "refs/for/master" will not create or update a reference named +"refs/for/master", but may create or update a pull request directly by +running the hook "proc-receive". ++ +Optional modifiers can be provided in the beginning of the value to filter +commands for specific actions: create (a), modify (m), delete (d). +A `!` can be included in the modifiers to negate the reference prefix entry. +E.g.: ++ + git config --system --add receive.procReceiveRefs ad:refs/heads + git config --system --add receive.procReceiveRefs !:refs/heads + receive.updateServerInfo:: If set to true, git-receive-pack will run git-update-server-info after receiving data from git-push and updating refs. |