GIT_PROMPT_IGNORE_STASH was broken. Fixes #106

master
Martin Gondermann 11 years ago
parent 62d95d5833
commit c0510cf2fa
  1. 1
      gitprompt.sh
  2. 2
      gitstatus.sh

@ -378,6 +378,7 @@ function updatePrompt() {
git_prompt_config git_prompt_config
export __GIT_PROMPT_IGNORE_STASH=${GIT_PROMPT_IGNORE_STASH}
local -a GitStatus local -a GitStatus
GitStatus=($("$__GIT_STATUS_CMD" 2>/dev/null)) GitStatus=($("$__GIT_STATUS_CMD" 2>/dev/null))

@ -39,7 +39,7 @@ num_changed=$(( `all_lines "$gitstatus"` - `count_lines "$gitstatus" U` ))
num_conflicts=`count_lines "$staged_files" U` num_conflicts=`count_lines "$staged_files" U`
num_staged=$(( `all_lines "$staged_files"` - num_conflicts )) num_staged=$(( `all_lines "$staged_files"` - num_conflicts ))
num_untracked=`git ls-files --others --exclude-standard | wc -l` 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 num_stashed=0
else else
num_stashed=`git stash list | wc -l` num_stashed=`git stash list | wc -l`

Loading…
Cancel
Save