summaryrefslogtreecommitdiffstats
path: root/test/repos/pre_commit_hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/repos/pre_commit_hook.sh')
-rwxr-xr-xtest/repos/pre_commit_hook.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/repos/pre_commit_hook.sh b/test/repos/pre_commit_hook.sh
new file mode 100755
index 000000000..8857f4145
--- /dev/null
+++ b/test/repos/pre_commit_hook.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -ex; rm -rf repo; mkdir repo; cd repo
+
+git init
+cp ../pre-commit .git/hooks/pre-commit
+chmod +x .git/hooks/pre-commit
+
+echo "file" > file
+git add file