diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2020-06-17 17:39:07 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2020-06-17 20:05:17 -0400 |
| commit | 0b669acac07a2b325316a46cca01a5cb85eede3b (patch) | |
| tree | a190aa4b0ac4c7d56821095f5e42c52969c24f27 /.git-hooks/pre-merge-commit | |
| parent | 5257b85551459098b8e74cb14e6294a4f1a4226e (diff) | |
Provide a git hook to automate tests.
When enabled, these hooks run the same tests as Travis, every commit.
There's nothing inherently wrong with a failing test run (it's a useful
signal), but the turnaround time for responding to Travis is a lot
longer than the turnaround time for responding to a local test failure.
The tradeoff here is that `git commit`, which is a _very_ common
operation, takes considerably longer when the hooks are enabled, and
runs a higher risk of giving users doorway effect issues.
Diffstat (limited to '.git-hooks/pre-merge-commit')
| -rwxr-xr-x | .git-hooks/pre-merge-commit | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.git-hooks/pre-merge-commit b/.git-hooks/pre-merge-commit new file mode 100755 index 0000000..efdecc9 --- /dev/null +++ b/.git-hooks/pre-merge-commit @@ -0,0 +1,7 @@ +#!/bin/bash -e + +# Run the pre-commit hook on merges, too. + +if [ -x .git-hooks/pre-commit ]; then + exec .git-hooks/pre-commit +fi |
