diff options
author | Qrius <[email protected]> | 2024-09-26 07:25:30 +0200 |
---|---|---|
committer | Qrius <[email protected]> | 2024-09-26 07:25:30 +0200 |
commit | bedab7b76ee9acb5e0a74b0a1f52fe24cd35d02b (patch) | |
tree | a3d3f35d7f4511bdfec5fc7d73fda2044214781a /bin | |
parent | 281d3a36c03f0827e799070341a995d754f5e32e (diff) | |
download | skaldpress-bedab7b76ee9acb5e0a74b0a1f52fe24cd35d02b.tar.gz skaldpress-bedab7b76ee9acb5e0a74b0a1f52fe24cd35d02b.zip |
Add post-commit hook for setting sensible committer
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pre-commit | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/pre-commit b/bin/pre-commit new file mode 100755 index 0000000..b68ba3d --- /dev/null +++ b/bin/pre-commit @@ -0,0 +1,16 @@ +#!/bin/sh + +LOCK_FILE=".git/.amend-lock" +if [ -f "$LOCK_FILE" ]; then + rm "$LOCK_FILE" + exit 0 +fi +touch "$LOCK_FILE" + +export GIT_COMMITTER_NAME="Qrius" +export GIT_COMMITTER_EMAIL="[email protected]" +export GIT_AUTHOR_NAME="Qrius" +export GIT_AUTHOR_EMAIL="[email protected]" + +echo "Doing commit amend" +git commit --amend --no-edit --author="$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" |