[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: maint: Only run `make authenticate` when pushing
From: |
guix-commits |
Subject: |
branch master updated: maint: Only run `make authenticate` when pushing commits. |
Date: |
Mon, 14 Dec 2020 12:16:41 -0500 |
This is an automated email from the git hooks/post-receive script.
lfam pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 80ebcdd maint: Only run `make authenticate` when pushing commits.
80ebcdd is described below
commit 80ebcdd100a82fdc582e62f35042c74ce38ea753
Author: Leo Famulari <leo@famulari.name>
AuthorDate: Fri Aug 14 16:30:47 2020 -0400
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 415345f..59671b0 100755
--- a/etc/git/pre-push
+++ b/etc/git/pre-push
@@ -20,13 +20,26 @@
#
# <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
+# This is the "empty hash" used by Git when pushing a branch deletion.
+z40=0000000000000000000000000000000000000000
+
+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" != $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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: maint: Only run `make authenticate` when pushing commits.,
guix-commits <=