lalles
This commit is contained in:
23
gitconfig
Normal file
23
gitconfig
Normal 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
18
run_local_hook
Normal 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
|
||||||
Reference in New Issue
Block a user