replacing replacing "git status" option "--short" by "--porcelain"
The behavior of porcelain seems more adapted to the liquidprompt usage From the "git status" documentation : The porcelain format is similar to the short format, but is guaranteed not to change in a backwards-incompatible way between git versions or based on user configuration. This makes it ideal for parsing by scripts. The description of the short format above also describes the porcelain format, with a few exceptions: 1. The user’s color.status configuration is not respected; color will always be off. [...]
This commit is contained in:
parent
6c012c28d6
commit
89540d3125
@ -710,7 +710,7 @@ _lp_git_branch_color()
|
||||
|
||||
local end
|
||||
end="$NO_COL"
|
||||
if LC_ALL=C \git status -s 2>/dev/null | grep -Eq '^\?\?'; then
|
||||
if LC_ALL=C \git status --porcelain 2>/dev/null | grep -Eq '^\?\?'; then
|
||||
end="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED$end"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user