all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#42868] [PATCH] maint: Only run `make authenticate` when pushing commits.
@ 2020-08-14 20:30 Leo Famulari
  2020-08-19 22:29 ` Jakub Kądziołka
  2020-08-30 19:47 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Leo Famulari @ 2020-08-14 20:30 UTC (permalink / raw)
  To: 42868

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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-14 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-14 20:30 [bug#42868] [PATCH] maint: Only run `make authenticate` when pushing commits Leo Famulari
2020-08-19 22:29 ` Jakub Kądziołka
2020-08-30 19:47 ` Ludovic Courtès
2020-12-13 20:35   ` Leo Famulari
2020-12-14  8:28     ` Ludovic Courtès
2020-12-14 17:17       ` bug#42868: " Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.