From 9a9decbdd4a96fe370f9ee9979ca716c9473afad Mon Sep 17 00:00:00 2001 From: Rene Schallner Date: Tue, 18 Apr 2023 21:02:35 +0200 Subject: [PATCH] removed precommit-hook --- precommit-hook.sh | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 precommit-hook.sh diff --git a/precommit-hook.sh b/precommit-hook.sh deleted file mode 100755 index 0d2b616..0000000 --- a/precommit-hook.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# this file is installed in the repository as file: .git/hooks/pre-commit - -# we check for `./src/deps/facilio` in the list of files to be committed and -# only allow to proceed if the IKNOWWHATIMDOING env var is set - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=$(git hash-object -t tree /dev/null) -fi - -# Redirect output to stderr. -exec 1>&2 - - -if git diff --name-only --cached --diff-filter=M | grep 'src/deps/facilio' > /dev/null; then - if [ "$IKNOWWHATIMDOING" = "" ] ; then - cat <<\EOF -Error: src/deps/facilio is staged for commit. - -This is most likely unintentional. Pease consider if this is what you want. - -See `CONTRIBUTING.md` for an explaination. - -If you know what you are doing you can disable this check using: - - IKNOWWHATIMDOING=true git commit ... -EOF - exit 1 - fi - echo "WARNING: src/deps/facilio is staged for commit. See CONTRIBUTING.md" -fi -