Renamed array variable to _fields to comply with the other arrays

master
oGre 10 years ago
parent ed44f6bc9d
commit ca7a848ca4
  1. 12
      gitstatus.sh

@ -69,14 +69,14 @@ else
if [[ "${#branch_fields[@]}" -eq 1 ]]; then if [[ "${#branch_fields[@]}" -eq 1 ]]; then
remote="_NO_REMOTE_TRACKING_" remote="_NO_REMOTE_TRACKING_"
else else
IFS="[,]" read -ra remote_line <<< "${branch_fields[1]}" IFS="[,]" read -ra remote_fields <<< "${branch_fields[1]}"
for rline in "${remote_line[@]}"; do for remote_field in "${remote_fields[@]}"; do
if [[ "$rline" == *ahead* ]]; then if [[ "$remote_field" == *ahead* ]]; then
num_ahead=${rline:6} num_ahead=${remote_field:6}
ahead="_AHEAD_${num_ahead}" ahead="_AHEAD_${num_ahead}"
fi fi
if [[ "$rline" == *behind* ]]; then if [[ "$remote_field" == *behind* ]]; then
num_behind=${rline:7} num_behind=${remote_field:7}
behind="_BEHIND_${num_behind# }" behind="_BEHIND_${num_behind# }"
fi fi
done done

Loading…
Cancel
Save