cfg/bin/git-c
Knut Ahlers e4cca82e2d
Make sign-off configurable
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-11-10 12:47:04 +01:00

26 lines
520 B
Bash
Executable file

#!/bin/bash
set -eu
set -o pipefail
source "${HOME}/bin/script_framework.sh"
### Fix committer email by repo
step "Ensure correct commit config..."
git committerconfig
### Commit
step "Loading passphrase for GPG key..."
vault-gpg $(git config user.signingkey)
step "Execute pre-commit auto-hook"
git autohook pre-commit
step "Issuing commit..."
COMMIT_OPTS=$(git config --get commit.cliopts 2>/dev/null || echo "")
git commit -v ${COMMIT_OPTS} "$@"
step "Execute post-commit auto-hook"
git autohook post-commit