This commit is contained in:
2025-08-04 19:37:17 +02:00
parent bb1781500e
commit 04c72b75d1
2 changed files with 41 additions and 0 deletions

23
gitconfig Normal file
View File

@@ -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

18
run_local_hook Normal file
View File

@@ -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