diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-03-20 01:33:18 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-03-20 01:33:18 -0600 |
commit | 9ef311d868248682a11c8cb8c0177bc9949be7b9 (patch) | |
tree | 9a8a586ac152d99c160e104e4e6d307ff72dcea1 /src | |
parent | 2e6e3fc07ed1a0ae56c653071aa1aaf6439cdafc (diff) | |
download | pass-9ef311d868248682a11c8cb8c0177bc9949be7b9.tar.gz pass-9ef311d868248682a11c8cb8c0177bc9949be7b9.tar.bz2 pass-9ef311d868248682a11c8cb8c0177bc9949be7b9.zip |
git: sign commits if enabled
Diffstat (limited to '')
-rwxr-xr-x | src/password-store.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh index f7ad52b..a5d3374 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -69,7 +69,8 @@ git_add_file() { [[ -d $GIT_DIR ]] || return git add "$1" || return [[ -n $(git status --porcelain "$1") ]] || return - git commit -m "$2" + [[ $(git config --bool --get pass.signcommits) == "true" ]] && sign="-S" || sign="" + git commit $sign -m "$2" } yesno() { read -r -p "$1 [y/N] " response |