diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/git-setup | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/git-setup b/tools/git-setup index 6f3c36f1cb..f40a7724d9 100755 --- a/tools/git-setup +++ b/tools/git-setup @@ -3,21 +3,21 @@ cd "$(dirname -- "$0")" cd "$(git rev-parse --show-toplevel)" if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then - # This part is allowed to fail - cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ - chmod +x .git/hooks/pre-commit && \ - echo "Activated pre-commit hook." || : + # This part is allowed to fail + cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ + chmod +x .git/hooks/pre-commit && \ + echo "Activated pre-commit hook." || : fi declare -A fetch git config -f .gitconfig --get-regexp '.*' | while read -r key val; do - if [[ $key = *.fetch ]]; then - if [[ -z "${fetch[$key]}" ]]; then - git config --local --unset-all "$key" - fetch[$key]='true' - fi - git config --local --add "$key" "$val" - else - git config --local "$key" "$val" - fi + if [[ $key = *.fetch ]]; then + if [[ -z "${fetch[$key]}" ]]; then + git config --local --unset-all "$key" + fetch[$key]='true' + fi + git config --local --add "$key" "$val" + else + git config --local "$key" "$val" + fi done |