diff options
Diffstat (limited to '')
| -rwxr-xr-x | git-sonar | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -124,7 +124,8 @@ line_count() { } status_count() { - echo "$git_status" | grep -E "$1" | line_count + # Use a sed transform to prevent unmerged paths from being miscounted + echo "$git_status" | sed -nE "s/^AA /AU /;s/^DD /DU /;/${1}/p" | line_count } print_commit_range() { @@ -201,7 +202,7 @@ element_unstaged() { element_unmerged() { if [ -n "$opt_status" ]; then for x in A D U; do - if cnt="$(status_count "^(${x}${x}|U${x}|${x}U) ")"; then + if cnt="$(status_count "^(U${x}|${x}U) ")"; then printf '%s%b%s%b' "$cnt" "$STATUS_COLOR_UNMERGED" "$x" "$COLOR_DEFAULT" fi done |
