Fixes poorly made Git safe.directory workaround
This commit is contained in:
parent
c47c9372bf
commit
12910e0d37
@ -56,9 +56,7 @@ function git_ensure_safe_directory() {
|
||||
if [[ -n "$(command -v git)" ]]; then
|
||||
local git_dir="$1"
|
||||
display_alert "git: Marking all directories as safe, which should include" "$git_dir" "debug"
|
||||
if ! grep -q "directory = \*" "${HOME}/.gitconfig" 2> /dev/null; then
|
||||
git config --global --add safe.directory "*"
|
||||
fi
|
||||
regular_git -C "$1" config --local --get safe.directory "$1" > /dev/null || regular_git -C "$1" config --local --add safe.directory "$1"
|
||||
else
|
||||
display_alert "git not installed" "a true wonder how you got this far without git - it will be installed for you" "warn"
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user