Bash: Fix untracked files check.
This commit is contained in:
parent
77d8b3e033
commit
5ffb925cc6
@ -38,7 +38,7 @@ function prompt_command() {
|
|||||||
# Modified files
|
# Modified files
|
||||||
git diff --no-ext-diff --quiet --exit-code --ignore-submodules 2>/dev/null || dirty=1
|
git diff --no-ext-diff --quiet --exit-code --ignore-submodules 2>/dev/null || dirty=1
|
||||||
# Untracked files
|
# Untracked files
|
||||||
[ -z "$dirty" ] && git ls-files --others --error-unmatch . >/dev/null 2>&1 && dirty=1
|
[ -z "$dirty" ] && test -n "$(git status --porcelain)" && dirty=1
|
||||||
|
|
||||||
# Format Git info
|
# Format Git info
|
||||||
if [ -n "$dirty" ]; then
|
if [ -n "$dirty" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user