Revert "Stop altering global git config file and set safe per cloned repository"

This reverts commit ccde662ccb.
This commit is contained in:
Igor Pecovnik
2025-03-16 17:25:15 +01:00
committed by Igor
parent a9ff12533e
commit 4530b26278

View File

@@ -57,7 +57,7 @@ function git_ensure_safe_directory() {
local git_dir="$1" local git_dir="$1"
if [[ -e "$1/.git" ]]; then if [[ -e "$1/.git" ]]; then
display_alert "git: Marking all directories as safe, which should include" "$git_dir" "debug" display_alert "git: Marking all directories as safe, which should include" "$git_dir" "debug"
git config --local --get safe.directory "$1" > /dev/null || regular_git config --local --add safe.directory "$1" git config --global --get safe.directory "$1" > /dev/null || regular_git config --global --add safe.directory "$1"
fi fi
else else
display_alert "git not installed" "a true wonder how you got this far without git - it will be installed for you" "warn" display_alert "git not installed" "a true wonder how you got this far without git - it will be installed for you" "warn"