-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a managed hooks folder and installation instructions
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Hooks | ||
This folder contains the official rerun githooks. | ||
|
||
Each hook is designed to call through to a corresponding hook in the scripts directory. | ||
- `pre-push` -> `scripts/pre-push.sh` | ||
|
||
### Installation | ||
To install the hooks, simply copy them into the `.git/hooks` directory of your local checkout. | ||
``` | ||
cp hooks/pre-push .git/hooks/pre-push | ||
chmod +x .git/hooks/pre-push | ||
``` | ||
or if you prefer you can configure git to use this directory as the hooks directory: | ||
``` | ||
git config core.hooksPath hooks | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# This is a shim to call through to the managed pre-push hook. | ||
# See: hooks/README.md for more details. | ||
repo_root=$(git rev-parse --show-toplevel) | ||
sh $repo_root/scripts/pre-push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# This script is intended to be called from the git pre-push hook. | ||
# See: hooks/README.md for more details. | ||
|
||
just fast-lint |