Merge pull request #335 from edubxb/old-git-support

Fix regression checking git repo status
pull/336/head
Travis Swicegood 2014-08-25 16:09:49 -07:00
commit aca0f02ad8
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ function git_prompt_vars {
SCM_GIT_STASH='' SCM_GIT_STASH=''
if [[ "$(git config --get bash-it.hide-status)" != "1" ]]; then if [[ "$(git config --get bash-it.hide-status)" != "1" ]]; then
local status="$(git status -b --porcelain 2> /dev/null || git status --porcelain 2> /dev/null)" local status="$(git status -b --porcelain 2> /dev/null || git status --porcelain 2> /dev/null)"
if [[ -n "${status}" ]] && [[ "${status}" != "\n" ]]; then if [[ -n "${status}" ]] && [[ "${status}" != "\n" ]] && [[ -n "$(grep -v ^# <<< "${status}")" ]]; then
SCM_DIRTY=1 SCM_DIRTY=1
SCM_STATE=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY} SCM_STATE=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}
else else