From patchwork Mon Feb 17 14:44:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew DeVault X-Patchwork-Id: 11386565 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D1469924 for ; Mon, 17 Feb 2020 14:52:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8856F20801 for ; Mon, 17 Feb 2020 14:52:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cmpwn.com header.i=@cmpwn.com header.b="Cl4lFuK1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729226AbgBQOwp (ORCPT ); Mon, 17 Feb 2020 09:52:45 -0500 Received: from mail.cmpwn.com ([45.56.77.53]:56534 "EHLO mail.cmpwn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727421AbgBQOwp (ORCPT ); Mon, 17 Feb 2020 09:52:45 -0500 X-Greylist: delayed 486 seconds by postgrey-1.27 at vger.kernel.org; Mon, 17 Feb 2020 09:52:45 EST DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1581950679; bh=IgLIwNxn7fV+CBBDAxh9W/EaK0xrGkJBILiDCQ4n7F4=; h=From:To:Cc:Subject:Date; b=Cl4lFuK11iKC3yrwWelTH2SA0uAA4EmUkishx9pAVhnt6rAqIgbuKEQZprjkTRQlH UpL+6ajOMCYQxBbidWrzlhRKKTiDMdZFn3023LIXoGDIfQAQyBkq10X1BxqHn+PsgD yC2uVTgWJ/w6MjFW08XPtqGEWi6n4BV9WonVxm7E= From: Drew DeVault To: git@vger.kernel.org, Stefan Beller , Junio C Hamano Cc: Drew DeVault Subject: [PATCH 1/2] git-receive-pack: document push options Date: Mon, 17 Feb 2020 09:44:31 -0500 Message-Id: <20200217144432.43920-1-sir@cmpwn.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This adds the missing documentation on how git push options are presented to the pre-receive hook. Signed-off-by: Drew DeVault --- 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