From 8a82b6b9c1c90885a069cf9422e9ea0468344b08 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 20 Jul 2025 11:41:34 +0900 Subject: [PATCH] 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 --- etc/git/pre-push | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/git/pre-push b/etc/git/pre-push index 998df45e6dd625d916e94a03cd4e54651cd5f79a..9ce3dd4cb76e7d545e8729ea9b0a1aa662cf02d2 100755 --- a/etc/git/pre-push +++ b/etc/git/pre-push @@ -38,11 +38,17 @@ do # and thus there are no signatures or news updates to be verified. if [ "$local_hash" != $z40 ] then - # Skip the hook when performing a pull-request. + # Skip the hook when performing a pull-request... case "$remote_ref" in refs/for/*) 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 # Only perform checks when pushing to upstream.