From c279c77fd8437a813a838083de39506f9dfe2ec8 Mon Sep 17 00:00:00 2001 From: oGre Date: Sun, 27 Sep 2015 18:14:52 +0200 Subject: [PATCH 1/2] Resolved conflict --- gitstatus.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitstatus.sh b/gitstatus.sh index 3b87cf0..c2a8e40 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -40,7 +40,8 @@ if [[ "$__GIT_PROMPT_IGNORE_STASH" = "1" ]]; then else stash_file="$( git rev-parse --git-dir )/logs/refs/stash" if [[ -e "${stash_file}" ]]; then - num_stashed=$( wc -l < "${stash_file}" | tr -s ' ' | cut -d ' ' -f2 ) + wc_output=$( wc -l < "${stash_file}" ) + num_stashed=${wc_output// /} else num_stashed=0 fi From 89acb1c4b0925cf40d1d016c2610552836f310db Mon Sep 17 00:00:00 2001 From: oGre Date: Sun, 27 Sep 2015 18:43:30 +0200 Subject: [PATCH 2/2] Changed to match tabs and spaces --- gitstatus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitstatus.sh b/gitstatus.sh index c2a8e40..9b763e0 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -41,7 +41,7 @@ else stash_file="$( git rev-parse --git-dir )/logs/refs/stash" if [[ -e "${stash_file}" ]]; then wc_output=$( wc -l < "${stash_file}" ) - num_stashed=${wc_output// /} + num_stashed=${wc_output//[[:space:]]/} else num_stashed=0 fi