aboutsummaryrefslogtreecommitdiff
path: root/tests/git-pre-commit-common.testscript
blob: ae8b9d4eb5946bb61dbd701634ca7bfc2254e2b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# file      : tests/git-pre-commit-common.testscript
# license   : MIT; see accompanying LICENSE file

# Set commonly-used variables and configure git to call the hook being tested.
# Assume that git-common.testscript is already included.
#
gc = $gp commit -a --allow-empty-message -m ''

hooks_dir=$~/hooks
+mkdir $hooks_dir
+$gp config core.hooksPath $hooks_dir

+ln -s $0 $hooks_dir/pre-commit