git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Drew DeVault <sir@cmpwn.com>
To: git@vger.kernel.org, Stefan Beller <stefanbeller@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Cc: Drew DeVault <sir@cmpwn.com>
Subject: [PATCH 1/2] git-receive-pack: document push options
Date: Mon, 17 Feb 2020 09:44:31 -0500	[thread overview]
Message-ID: <20200217144432.43920-1-sir@cmpwn.com> (raw)

This adds the missing documentation on how git push options are
presented to the pre-receive hook.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
---
 Documentation/git-receive-pack.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt
index 25702ed730..69b3e77776 100644
--- a/Documentation/git-receive-pack.txt
+++ b/Documentation/git-receive-pack.txt
@@ -109,6 +109,12 @@ the following environment variables:
 This hook is called before any refname is updated and before any
 fast-forward checks are performed.
 
+If the user has specified any push options (see linkgit:git-push[1]),
+`GIT_PUSH_OPTION_COUNT` is set to the number of options, and
+`GIT_PUSH_OPTION_N` is set where N is an integer from 0 thru
+`GIT_PUSH_OPTION_COUNT` - 1. In order for to receive push options,
+`receive.advertisePushOptions` must be enabled on the server.
+
 If the pre-receive hook exits with a non-zero exit status no updates
 will be performed, and the update, post-receive and post-update
 hooks will not be invoked either.  This can be useful to quickly
-- 
2.25.0


             reply	other threads:[~2020-02-17 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 14:44 Drew DeVault [this message]
2020-02-17 14:44 ` [PATCH 2/2] send-pack: downgrade push options error to warning Drew DeVault
2020-02-18  5:40   ` Jeff King
2020-02-18 17:44     ` Junio C Hamano
2020-02-18  5:30 ` [PATCH 1/2] git-receive-pack: document push options Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217144432.43920-1-sir@cmpwn.com \
    --to=sir@cmpwn.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stefanbeller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).