diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..a26bb88 --- /dev/null +++ b/gitconfig @@ -0,0 +1,23 @@ +[core] + hooksPath = /etc/git/hooks/ + quotePath = false + commitGraph = true + logallrefupdates = true +[user] + email = gitea@fake.local + name = Gitea +[receive] + advertisePushOptions = true + procReceiveRefs = refs/for +[gc] + writeCommitGraph = true + reflogexpire = 90 +[fetch] + writeCommitGraph = true +[safe] + directory = * +[uploadpack] + allowfilter = true + allowAnySHA1InWant = true +[diff] + algorithm = histogram \ No newline at end of file diff --git a/run_local_hook b/run_local_hook new file mode 100644 index 0000000..ad15002 --- /dev/null +++ b/run_local_hook @@ -0,0 +1,18 @@ +#!/bin/bash + +echo "Running local hook $1 with params ${@:2}" + +# Run local hook if exists +HOOK=$1 +#PROJECT_ROOT=$(git rev-parse --show-toplevel) +PROJECT_ROOT=$PWD + +if [ -e "$PROJECT_ROOT/hooks/$HOOK" ]; then + echo "Using local $HOOK at $PROJECT_ROOT/hooks/$HOOK in $PROJECT_ROOT" + $PROJECT_ROOT/hooks/$HOOK ${@:2} + INTERNAL_HOOK_EXIT_CODE=$? + echo "Internal hook exited with $INTERNAL_HOOK_EXIT_CODE" + exit $INTERNAL_HOOK_EXIT_CODE +else + exit 0 +fi