initial version to check for staged changes
This commit is contained in:
19
pre-commit
Executable file
19
pre-commit
Executable 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
|
Reference in New Issue
Block a user