mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
maint: Only run make authenticate
when pushing commits.
* etc/git/pre-push: Exit early when deleting a branch.
This commit is contained in:
parent
3ef808bbeb
commit
80ebcdd100
1 changed files with 23 additions and 10 deletions
|
@ -20,13 +20,26 @@
|
||||||
#
|
#
|
||||||
# <local ref> <local sha1> <remote ref> <remote sha1>
|
# <local ref> <local sha1> <remote ref> <remote sha1>
|
||||||
|
|
||||||
# Only use the hook when pushing to Savannah.
|
# This is the "empty hash" used by Git when pushing a branch deletion.
|
||||||
case "$2" in
|
z40=0000000000000000000000000000000000000000
|
||||||
*.gnu.org*)
|
|
||||||
exec make authenticate check-channel-news
|
while read local_ref local_hash remote_ref remote_hash
|
||||||
exit 127
|
do
|
||||||
;;
|
# When deleting a remote branch, no commits are pushed to the remote, and
|
||||||
*)
|
# thus there are no signatures to be verified.
|
||||||
exit 0
|
if [ "$local_hash" != $z40 ]
|
||||||
;;
|
then
|
||||||
esac
|
# 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
|
||||||
|
|
Loading…
Reference in a new issue