diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-11-07 09:14:16 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-11-07 09:14:16 -0700 |
commit | 03e44b89ef396b13edd346f9d8914f0b89edd077 (patch) | |
tree | a41b91e768f530a99ee7326db38dec5ceee2e4a0 /lib | |
parent | e0490809d9086b78d9434fd605c88dad73e56c0e (diff) | |
download | dotfiles-03e44b89ef396b13edd346f9d8914f0b89edd077.tar.gz |
automatically sign dotfiles commits, finally
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/hooks/git/dotfiles/post-checkout | 12 |
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 |