summaryrefslogtreecommitdiff
path: root/etc/git
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-07-20 11:41:34 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-07-20 12:00:53 +0900
commit8a82b6b9c1c90885a069cf9422e9ea0468344b08 (patch)
tree40813021fc18cede29fe3f23353444f6aba8d136 /etc/git
parent52bc919f4b90b937500e75f63f37479957f5fb3d (diff)
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
Diffstat (limited to 'etc/git')
-rwxr-xr-xetc/git/pre-push8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/git/pre-push b/etc/git/pre-push
index 998df45e6dd..9ce3dd4cb76 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.