Skip to content

Commit c0510cf

Browse files
committed
GIT_PROMPT_IGNORE_STASH was broken. Fixes #106
1 parent 62d95d5 commit c0510cf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

gitprompt.sh

+1
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ function updatePrompt() {
378378

379379
git_prompt_config
380380

381+
export __GIT_PROMPT_IGNORE_STASH=${GIT_PROMPT_IGNORE_STASH}
381382
local -a GitStatus
382383
GitStatus=($("$__GIT_STATUS_CMD" 2>/dev/null))
383384

gitstatus.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ num_changed=$(( `all_lines "$gitstatus"` - `count_lines "$gitstatus" U` ))
3939
num_conflicts=`count_lines "$staged_files" U`
4040
num_staged=$(( `all_lines "$staged_files"` - num_conflicts ))
4141
num_untracked=`git ls-files --others --exclude-standard | wc -l`
42-
if [[ -n "$GIT_PROMPT_IGNORE_STASH" ]]; then
42+
if [[ "$__GIT_PROMPT_IGNORE_STASH" = "1" ]]; then
4343
num_stashed=0
4444
else
4545
num_stashed=`git stash list | wc -l`

0 commit comments

Comments
 (0)