mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00: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,6 +20,15 @@
|
||||||
#
|
#
|
||||||
# <local ref> <local sha1> <remote ref> <remote sha1>
|
# <local ref> <local sha1> <remote ref> <remote sha1>
|
||||||
|
|
||||||
|
# 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.
|
# Only use the hook when pushing to Savannah.
|
||||||
case "$2" in
|
case "$2" in
|
||||||
*.gnu.org*)
|
*.gnu.org*)
|
||||||
|
@ -30,3 +39,7 @@ case "$2" in
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue