summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-12-31 15:46:40 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-12-31 15:48:44 -0700
commite8c6170613c8855962e7cbbb51f1beb1be644b40 (patch)
treefa52780899d9dc8da51f22c76b0e7685b93a1ae8 /hooks
parent451525e4b5d0c83e2d934f5e4153d89a687138e7 (diff)
downloaddotfiles-e8c6170613c8855962e7cbbb51f1beb1be644b40.tar.gz
stop setting commit.gpgsign in dotfiles repo
Instead, rely on git-dotfiles-rebase amending the tip of master.
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/git/dotfiles/post-checkout_01gpgsign23
1 files changed, 0 insertions, 23 deletions
diff --git a/hooks/git/dotfiles/post-checkout_01gpgsign b/hooks/git/dotfiles/post-checkout_01gpgsign
deleted file mode 100755
index 21b007cc..00000000
--- a/hooks/git/dotfiles/post-checkout_01gpgsign
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-branch="$(git symbolic-ref --quiet --short HEAD)"
-if ! [ $? = 0 ]; then # detached HEAD
- git config commit.gpgsign false
- exit 0
-fi
-
-# Check that signing is likely to succeed before setting
-# commit.gpgsign, by looking for presence of a secret key with the
-# signing capability.
-#
-# The reason this is needed is that this post-checkout hook will get
-# called during a rebase onto master, and I want to do that on hosts
-# which don't have access to my secret key. If commit.gpgsign gets
-# set to true on those hosts, the rebase will be interrupted
-if [ "$branch" = "master" ] \
- && gpg --list-secret-keys $(git config user.signingKey) 2>/dev/null \
- | grep -Eq '^(ssb|sec)[^#].*\[[A-Z]*S[A-Z]*\]$'; then
- git config commit.gpgsign true
-else
- git config commit.gpgsign false
-fi