diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-01-13 23:39:52 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-01-13 23:45:53 -0500 |
commit | 01f0707207741ce2a5d7509a175464799b08aea6 (patch) | |
tree | 08e8f4da56f26363c3b53e0442a21b286b55e0e5 /etc/git/pre-push | |
parent | 734bcf13139119daf8685f93b056c3422dbfa264 (diff) | |
parent | 6985a1acb3e9cc4cad8b6f63d77154842d25c929 (diff) | |
download | guix-01f0707207741ce2a5d7509a175464799b08aea6.tar.gz |
Merge branch 'staging' into 'core-updates'.
Conflicts: gnu/local.mk gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/gl.scm gnu/packages/glib.scm gnu/packages/guile.scm gnu/packages/node.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/python-xyz.scm gnu/packages/python.scm gnu/packages/tls.scm gnu/packages/vpn.scm gnu/packages/xorg.scm
Diffstat (limited to 'etc/git/pre-push')
-rwxr-xr-x | etc/git/pre-push | 33 |
1 files 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 @@ # # <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 |