]> code.delx.au - monosys/commitdiff
git-no-husky
authorJames Bunton <jbunton@atlassian.com>
Sun, 3 Apr 2022 12:30:53 +0000 (22:30 +1000)
committerJames Bunton <jbunton@atlassian.com>
Sun, 3 Apr 2022 12:30:53 +0000 (22:30 +1000)
Husky is an awful tool that automatically adds git hooks. Kill it with fire!

hacks/git-no-husky [new file with mode: 0755]

diff --git a/hacks/git-no-husky b/hacks/git-no-husky
new file mode 100755 (executable)
index 0000000..7ed9144
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ "$1" = "config" ] && [ -z "${GIT_CONFIG_ENABLE}" ] && ! [[ "$2" =~ --get ]]; then
+    echo "Ignoring git $*"
+    exit 0
+fi
+
+/usr/bin/git "$@"