initial version to check for staged changes

This commit is contained in:
2024-02-19 10:18:41 -05:00
commit b8ff856fd8
2 changed files with 33 additions and 0 deletions

19
pre-commit Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -eu
# This also works
# $(git rev-parse --show-toplevel)/.git/hooks/pre-commit.sample
sample_hook="${PWD%"$GIT_PREFIX"}"/.git/hooks/pre-commit.sample
if test -x "$sample_hook"
then
$sample_hook
fi
current_dir=$(dirname "$0")
"$current_dir"/pre-commit-staged-check.sh
# vim: set ft=sh