summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-02-09 18:13:40 -0500
committerBen Sima <ben@bsima.me>2022-02-09 18:16:26 -0500
commitf664669439c0f005e3579d1c67b4ebd9fa24de36 (patch)
treeb2eadfc5ad5aab3452285da6c23e4f601fcdd334
parentf21e2920872fdf3c92dc815d51d6da032d157fea (diff)
Move git hooks to own folder
Instead of symlinking, just set the local git config.
-rw-r--r--Biz/Bild/ShellHook.sh8
-rwxr-xr-xBiz/Ide/hooks/post-checkout (renamed from Biz/Ide/post-checkout)0
-rwxr-xr-xBiz/Ide/hooks/post-merge (renamed from Biz/Ide/post-merge)0
-rwxr-xr-xBiz/Ide/hooks/pre-commit (renamed from Biz/Ide/pre-commit)0
-rwxr-xr-xBiz/Ide/hooks/pre-push (renamed from Biz/Ide/pre-push)0
5 files changed, 2 insertions, 6 deletions
diff --git a/Biz/Bild/ShellHook.sh b/Biz/Bild/ShellHook.sh
index 1cdb8ca..7e93850 100644
--- a/Biz/Bild/ShellHook.sh
+++ b/Biz/Bild/ShellHook.sh
@@ -24,12 +24,8 @@
alias runghc="runghc --ghc-arg=-i\$BIZ_ROOT"
alias guile="guile -L \$BIZ_ROOT"
alias tree="tree -I _ -F"
-# link git hooks
- rm -f "$BIZ_ROOT/.git/hooks/{post-checkout,post-merge,pre-commit,pre-push}"
- ln -s "$BIZ_ROOT/Biz/Ide/post-checkout" "$BIZ_ROOT/.git/hooks/post-checkout"
- ln -s "$BIZ_ROOT/Biz/Ide/post-merge" "$BIZ_ROOT/.git/hooks/post-merge"
- ln -s "$BIZ_ROOT/Biz/Ide/pre-commit" "$BIZ_ROOT/.git/hooks/pre-commit"
- ln -s "$BIZ_ROOT/Biz/Ide/pre-push" "$BIZ_ROOT/.git/hooks/pre-push"
+# configure git hooks
+ git config --local core.hooksPath "$BIZ_ROOT/Biz/Ide/hooks"
#
function deps() {
niv --sources-file "$BIZ_ROOT/Biz/Bild/Sources.json" "$@"
diff --git a/Biz/Ide/post-checkout b/Biz/Ide/hooks/post-checkout
index 95b35cd..95b35cd 100755
--- a/Biz/Ide/post-checkout
+++ b/Biz/Ide/hooks/post-checkout
diff --git a/Biz/Ide/post-merge b/Biz/Ide/hooks/post-merge
index 624e797..624e797 100755
--- a/Biz/Ide/post-merge
+++ b/Biz/Ide/hooks/post-merge
diff --git a/Biz/Ide/pre-commit b/Biz/Ide/hooks/pre-commit
index 507d7e6..507d7e6 100755
--- a/Biz/Ide/pre-commit
+++ b/Biz/Ide/hooks/pre-commit
diff --git a/Biz/Ide/pre-push b/Biz/Ide/hooks/pre-push
index 3d00aea..3d00aea 100755
--- a/Biz/Ide/pre-push
+++ b/Biz/Ide/hooks/pre-push