forked from acquia/blt
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes acquia#4496 to make a zsh version of git hooks.
- Loading branch information
Mike Madison
committed
Mar 28, 2022
1 parent
c7495dc
commit c147f48
Showing
5 changed files
with
25 additions
and
2 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
File renamed without changes.
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,9 @@ | ||
#!/usr/bin/env zsh | ||
|
||
ROOT_DIR="$(pwd)/" | ||
|
||
echo "Executing .git/hooks/pre-push..." | ||
"${ROOT_DIR}"/vendor/bin/blt internal:git-hook:execute:pre-push | ||
|
||
# Return the status of the last run command. | ||
exit $? |
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,11 @@ | ||
#!/usr/bin/env zsh | ||
|
||
ROOT_DIR="$(pwd)/" | ||
LIST=$( git diff --name-only --cached --diff-filter=ACM ) | ||
|
||
echo "Executing .git/hooks/pre-commit..." | ||
git diff-index --quiet HEAD -- || echo "Untracked files are present, this may impact the validity of pre-commit checks." | ||
"${ROOT_DIR}"/vendor/bin/blt internal:git-hook:execute:pre-commit "${LIST}" | ||
|
||
# Return the status of the last run command. | ||
exit $? |
File renamed without changes.