1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

etc: pre-push: Skip checks when pushing to the keyring branch.

Attempting to push new commits to the branch would previously fail like:

  error: commit X is not a descendant of introductory commit
  1m9edb3f66fd807b096b48283debdcddccfea34bad

* etc/git/pre-push (main): Skip checks when pushing to refs/heads/keyring.

Change-Id: I3ea20a10b6c8cc6b6c6f948f80bed902850214c5
This commit is contained in:
Maxim Cournoyer
2025-07-20 11:41:34 +09:00
parent 52bc919f4b
commit 8a82b6b9c1

View File

@@ -38,11 +38,17 @@ do
# and thus there are no signatures or news updates to be verified. # and thus there are no signatures or news updates to be verified.
if [ "$local_hash" != $z40 ] if [ "$local_hash" != $z40 ]
then then
# Skip the hook when performing a pull-request. # Skip the hook when performing a pull-request...
case "$remote_ref" in case "$remote_ref" in
refs/for/*) refs/for/*)
exit 0 exit 0
;; ;;
# ... or when pushing a new PGP key to the keyring branch,
# as this branch doesn't share ancestry with the master
# branch and fails the 'guix git authenticate' check.
refs/heads/keyring)
exit 0
;;
esac esac
# Only perform checks when pushing to upstream. # Only perform checks when pushing to upstream.