Skip to content

Commit

Permalink
GIT_PROMPT_IGNORE_STASH was broken. Fixes #106
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmonty committed Jan 3, 2015
1 parent 62d95d5 commit c0510cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions gitprompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion gitstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

1 comment on commit c0510cf

@tfe
Copy link

@tfe tfe commented on c0510cf Jan 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks!

Please sign in to comment.