From c0510cf2fa5da151cbde508cde3c77fd1cb0a34f Mon Sep 17 00:00:00 2001 From: Martin Gondermann Date: Sat, 3 Jan 2015 09:39:58 +0100 Subject: [PATCH] GIT_PROMPT_IGNORE_STASH was broken. Fixes #106 --- gitprompt.sh | 1 + gitstatus.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gitprompt.sh b/gitprompt.sh index efcda1a2..3b079567 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -378,6 +378,7 @@ function updatePrompt() { git_prompt_config + export __GIT_PROMPT_IGNORE_STASH=${GIT_PROMPT_IGNORE_STASH} local -a GitStatus GitStatus=($("$__GIT_STATUS_CMD" 2>/dev/null)) diff --git a/gitstatus.sh b/gitstatus.sh index 173a9667..267db45c 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -39,7 +39,7 @@ num_changed=$(( `all_lines "$gitstatus"` - `count_lines "$gitstatus" U` )) num_conflicts=`count_lines "$staged_files" U` num_staged=$(( `all_lines "$staged_files"` - num_conflicts )) num_untracked=`git ls-files --others --exclude-standard | wc -l` -if [[ -n "$GIT_PROMPT_IGNORE_STASH" ]]; then +if [[ "$__GIT_PROMPT_IGNORE_STASH" = "1" ]]; then num_stashed=0 else num_stashed=`git stash list | wc -l`