Git-plugin: Fix regex
No need to use a pipe in a "[]" and no need to use a group match when only one character is used.
This commit is contained in:
parent
048f7e1d9a
commit
e378fd36a3
1 changed files with 2 additions and 2 deletions
|
@ -280,9 +280,9 @@ function git-info() {
|
|||
else
|
||||
# Count: added/deleted/modified/renamed/unmerged/untracked
|
||||
# T (type change) is undocumented, see https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.8.2.txt
|
||||
[[ "$line" == (A|M|D|C|T)[MD\ ]\ * ]] && (( added++ ))
|
||||
[[ "$line" == [AMDCT][MD\ ]\ * ]] && (( added++ ))
|
||||
[[ "$line" == [\ MARC]D\ * ]] && (( deleted++ ))
|
||||
[[ "$line" == ?[M|T]\ * ]] && (( modified++ ))
|
||||
[[ "$line" == ?[MT]\ * ]] && (( modified++ ))
|
||||
[[ "$line" == R?\ * ]] && (( renamed++ ))
|
||||
[[ "$line" == (?U|U?|AA|DD)\ * ]] && (( unmerged++ ))
|
||||
[[ "$line" == \?\?\ * ]] && (( untracked++ ))
|
||||
|
|
Loading…
Add table
Reference in a new issue