Merge branch 'porcelain-no-wc' into porcelain

* porcelain-no-wc:
  Remove use of wc
master
Dan Nguyen 10 years ago
commit e10ecb4139
  1. 12
      gitstatus.sh

@ -35,15 +35,13 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
esac esac
done <<< "$gitstatus" done <<< "$gitstatus"
if [[ "$__GIT_PROMPT_IGNORE_STASH" = "1" ]]; then num_stashed=0
num_stashed=0 if [[ "$__GIT_PROMPT_IGNORE_STASH" != "1" ]]; then
else
stash_file="$( git rev-parse --git-dir )/logs/refs/stash" stash_file="$( git rev-parse --git-dir )/logs/refs/stash"
if [[ -e "${stash_file}" ]]; then if [[ -e "${stash_file}" ]]; then
wc_output=$( wc -l < "${stash_file}" ) while IFS='' read -r wcline || [[ -n "$wcline" ]]; do
num_stashed=${wc_output//[[:space:]]/} ((num_stashed++))
else done < ${stash_file}
num_stashed=0
fi fi
fi fi

Loading…
Cancel
Save