ghooks/pre-commit

20 lines
307 B
Plaintext
Raw Permalink Normal View History

#!/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