From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SOeFLBt81l/FNwAA0tVLHw (envelope-from ) for ; Sun, 13 Dec 2020 20:39:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CNZxKBt81l/sQwAAB5/wlQ (envelope-from ) for ; Sun, 13 Dec 2020 20:39:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6BA1D9402A2 for ; Sun, 13 Dec 2020 20:39:55 +0000 (UTC) Received: from localhost ([::1]:59028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koY9q-000681-Co for larch@yhetil.org; Sun, 13 Dec 2020 15:39:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koY66-0001P4-Ak for guix-patches@gnu.org; Sun, 13 Dec 2020 15:36:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koY66-0001wH-1x for guix-patches@gnu.org; Sun, 13 Dec 2020 15:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koY65-0004Gy-UF for guix-patches@gnu.org; Sun, 13 Dec 2020 15:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#42868] [PATCH] maint: Only run `make authenticate` when pushing commits. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Dec 2020 20:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42868 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 42868-submit@debbugs.gnu.org id=B42868.160789173316296 (code B ref 42868); Sun, 13 Dec 2020 20:36:01 +0000 Received: (at 42868) by debbugs.gnu.org; 13 Dec 2020 20:35:33 +0000 Received: from localhost ([127.0.0.1]:50447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koY5c-0004Em-Tc for submit@debbugs.gnu.org; Sun, 13 Dec 2020 15:35:33 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koY5b-0004EH-Qd for 42868@debbugs.gnu.org; Sun, 13 Dec 2020 15:35:32 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B422F5C00E9; Sun, 13 Dec 2020 15:35:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 13 Dec 2020 15:35:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=5g4bBNIi1k6SCz0Nq8XVLYSe XmTjEej/TSIAwSNpPro=; b=r+i0fxL3FIx/TLssofvTh8qQVKad9B4HUksk5j1E OuzBYVlZ/k7+eVhUoQl8lJNYF7l7bJzG8OPK/gJMzz32PGqBkw4xlohsi1i/9gYn vyWGLMZdIee7F/+qb8ev8yd4f34gJML80Mq9lKskt1u7qhl70HiTxXwZJiqGC/LE /aw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=5g4bBN Ii1k6SCz0Nq8XVLYSeXmTjEej/TSIAwSNpPro=; b=FSguhs0wLTVLuc20Qlv20j jWRyRerdAJ8syE2bTgoY2rZP137dyoLXRdlT+tqPU1uy7AaYZIdUfqMAaWHV0yv5 Jt4F6X68lxk6jgQkoRIe+HIhOXKxXku24D0l2or+F8QDuSOxi0t6l58bEalY5S+v RAgcFvURKy5XyUn6ryJcGqloYXVvlsten1XvELtWDfpJ9f+ck7XEjczsy0DLc0Y+ E667m/9x9RGhlqgBSn6wAfrPax/fw+1DI65ZJqQW4EMBK73vA/WDqt7O3vv4xGpt vM9RHT5hlrQ4BHuIB7YoSgpxZFSBtzlkJxD3d+B9XXA9NQU+TNDDsVG6XdtmK+YQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudekiedgudegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepiefghfeffedtffekveektddtieekfeffledtgfevkeekteeufedtfefhgefh keefnecukfhppeejfedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 328A924005C; Sun, 13 Dec 2020 15:35:26 -0500 (EST) Date: Sun, 13 Dec 2020 15:35:24 -0500 From: Leo Famulari Message-ID: References: <12ad49f9266b146b81f7c7347ec4d62d18602039.1597437024.git.leo@famulari.name> <873643j4pc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NEwhEoJ5M9AxA3VA" Content-Disposition: inline In-Reply-To: <873643j4pc.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42868@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=famulari.name header.s=mesmtp header.b=r+i0fxL3; dkim=fail (headers rsa verify failed) header.d=messagingengine.com header.s=fm1 header.b=FSguhs0w; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 6BA1D9402A2 X-Spam-Score: -1.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: +2MyJttHulHa --NEwhEoJ5M9AxA3VA Content-Type: multipart/mixed; boundary="6Qd2uZAI4StQ5LC4" Content-Disposition: inline --6Qd2uZAI4StQ5LC4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 30, 2020 at 09:47:59PM +0200, Ludovic Court=C3=A8s wrote: > Hi, >=20 > Leo Famulari skribis: >=20 > > When deleting a remote branch, no commits are pushed to the remote, and > > thus there are no signatures to be verified. > > > > * etc/git/pre-push: Exit early when deleting a branch. >=20 > I agree with Jakub regarding the =E2=80=98if=E2=80=99 :-), but other than= that it LGTM. The previous version of this patch was untested and broken! Here is a new one that is actually tested and working. --6Qd2uZAI4StQ5LC4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-maint-Only-run-make-authenticate-when-pushing-commit.patch" Content-Transfer-Encoding: quoted-printable =46rom e8546a590a560825c3231af14724329c3d2bfee7 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Fri, 14 Aug 2020 16:30:47 -0400 Subject: [PATCH] maint: Only run `make authenticate` when pushing commits. * etc/git/pre-push: Exit early when deleting a branch. --- etc/git/pre-push | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/etc/git/pre-push b/etc/git/pre-push index 415345fc75..59671b0d58 100755 --- a/etc/git/pre-push +++ b/etc/git/pre-push @@ -20,13 +20,26 @@ # # =20 -# Only use the hook when pushing to Savannah. -case "$2" in - *.gnu.org*) - exec make authenticate check-channel-news - exit 127 - ;; - *) - exit 0 - ;; -esac +# This is the "empty hash" used by Git when pushing a branch deletion. +z40=3D0000000000000000000000000000000000000000 + +while read local_ref local_hash remote_ref remote_hash +do + # When deleting a remote branch, no commits are pushed to the remote, and + # thus there are no signatures to be verified. + if [ "$local_hash" !=3D $z40 ] + then + # Only use the hook when pushing to Savannah. + case "$2" in + *.gnu.org*) + exec make authenticate check-channel-news + exit 127 + ;; + *) + exit 0 + ;; + esac + fi +done + +exit 0 --=20 2.29.2 --6Qd2uZAI4StQ5LC4-- --NEwhEoJ5M9AxA3VA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl/WewwACgkQJkb6MLrK fwgBfQ//Qri2GagSN+5KFYHZa4mRf8yMhAw81+t6/0HMBaOcWNPpmzpGuxNykN11 LJFiOaRL2AgXS72D8/VGoWmpqIlzHsoF4Rx2v+JqVSJ83tWfyPNpM6+lB48+gBB7 TLcYCASlqzAH0VBm49uA51GenC3KPray66v4tAhJl/YMcCP+Dde43lqFnAUv8Y8q +xn83krNMOBjYuVRIL34A1xbSSW7x2eTcvgnlIQ/bGovb6vbbfphVwUzGNOzNYw1 4+tVRXhIWs1ncRj4NliuuTpoSzk7PVaGfhu7wpq2SOQMb/5pyI3dV4RamlHafSK1 tuUt4JhI2uA/SJ1fnlRw+xjxEK2Cp/3RdfKwros4EMfVaHSLIYJE9pN25/E8eeO2 v/lGC+K3PxxLxl+7lwNXvbGEsFqZy1hfjOs951Es9yNuGk6kQ02rKK7XtCWvYA2c AFv+VHECZw+X7nnk9SRQ+p4pVaRgDd83/f8nbUvf9CvoDQmkbsTwhOyNeCbRVVQo byECaxduVgI7Sr0eNRIRHvmhGWlLD4N3hLSYLom+Z0+57hRmXKnkYjN5Eb/9LGpN KazQE0HbvQkwURqdeMEIMXlxaMKUX1DtKiuwHak3Iy8yD3mzEUtMyrsP7tgSuPAb tSlSRe8cyVsBiUzVzEYcxnbU6mYq6KTowgNFGxvfxcnmSQD0GJw= =+FVi -----END PGP SIGNATURE----- --NEwhEoJ5M9AxA3VA--