summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-11-07 09:14:16 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-11-07 09:14:16 -0700
commit03e44b89ef396b13edd346f9d8914f0b89edd077 (patch)
treea41b91e768f530a99ee7326db38dec5ceee2e4a0 /lib
parente0490809d9086b78d9434fd605c88dad73e56c0e (diff)
downloaddotfiles-03e44b89ef396b13edd346f9d8914f0b89edd077.tar.gz
automatically sign dotfiles commits, finally
Diffstat (limited to 'lib')
-rwxr-xr-xlib/hooks/git/dotfiles/post-checkout12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/hooks/git/dotfiles/post-checkout b/lib/hooks/git/dotfiles/post-checkout
new file mode 100755
index 00000000..65f98431
--- /dev/null
+++ b/lib/hooks/git/dotfiles/post-checkout
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+head="$2"
+branch="$(git name-rev --name-only $head)"
+
+echo >&2 "$branch"
+
+if [ "$branch" = "master" ]; then
+ git config commit.gpgsign true
+else
+ git config commit.gpgsign false
+fi