GNU bug report logs - #42868
[PATCH] maint: Only run `make authenticate` when pushing commits.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Fri, 14 Aug 2020 20:32:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Famulari <leo <at> famulari.name>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#42868: closed ([PATCH] maint: Only run `make authenticate`
 when pushing commits.)
Date: Mon, 14 Dec 2020 17:18:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 14 Dec 2020 12:17:13 -0500
with message-id <X9eeGfXE6kmXSCb8 <at> jasmine.lan>
and subject line Re: [bug#42868] [PATCH] maint: Only run `make authenticate` when pushing commits.
has caused the debbugs.gnu.org bug report #42868,
regarding [PATCH] maint: Only run `make authenticate` when pushing commits.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
42868: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42868
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH] maint: Only run `make authenticate` when pushing commits.
Date: Fri, 14 Aug 2020 16:30:47 -0400
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.
---
 etc/git/pre-push | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/etc/git/pre-push b/etc/git/pre-push
index 415345fc75..689673dcc9 100755
--- a/etc/git/pre-push
+++ b/etc/git/pre-push
@@ -20,13 +20,21 @@
 #
 #   <local ref> <local sha1> <remote ref> <remote sha1>
 
-# Only use the hook when pushing to Savannah.
-case "$2" in
-    *.gnu.org*)
-	exec make authenticate check-channel-news
-	exit 127
-	;;
-    *)
-	exit 0
-	;;
-esac
+z40=0000000000000000000000000000000000000000
+
+# If deleting a branch, there are no commits to check.
+if [ "$local_sha" = $z40 ]
+then
+	true
+else
+	# 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
-- 
2.28.0



[Message part 3 (message/rfc822, inline)]
From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 42868-done <at> debbugs.gnu.org
Subject: Re: [bug#42868] [PATCH] maint: Only run `make authenticate` when
 pushing commits.
Date: Mon, 14 Dec 2020 12:17:13 -0500
On Mon, Dec 14, 2020 at 09:28:01AM +0100, Ludovic Courtès wrote:
> Hi,
> 
> Leo Famulari <leo <at> famulari.name> skribis:
> 
> > From e8546a590a560825c3231af14724329c3d2bfee7 Mon Sep 17 00:00:00 2001
> > From: Leo Famulari <leo <at> famulari.name>
> > 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.
> 
> LGTM, thanks!

Thanks! Pushed as 80ebcdd100a82fdc582e62f35042c74ce38ea753


This bug report was last modified 4 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.