mirror of https://github.com/armbian/build.git
git: git_ensure_safe_directory(): check safety via git status
This commit is contained in:
parent
4db2f1abd2
commit
21ac546cbe
|
|
@ -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 --global --get safe.directory "$1" > /dev/null || regular_git config --global --add safe.directory "$1"
|
git -C "$1" status > /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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue