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
38 # and thus there are no signatures or news updates to be verified. 38 # and thus there are no signatures or news updates to be verified.
39 if [ "$local_hash" != $z40 ] 39 if [ "$local_hash" != $z40 ]
40 then 40 then
41 # Skip the hook when performing a pull-request. 41 # Skip the hook when performing a pull-request...
42 case "$remote_ref" in 42 case "$remote_ref" in
43 refs/for/*) 43 refs/for/*)
44 exit 0 44 exit 0
45 ;; 45 ;;
46 # ... or when pushing a new PGP key to the keyring branch,
47 # as this branch doesn't share ancestry with the master
48 # branch and fails the 'guix git authenticate' check.
49 refs/heads/keyring)
50 exit 0
51 ;;
46 esac 52 esac
47 53
48 # Only perform checks when pushing to upstream. 54 # Only perform checks when pushing to upstream.