pull/342/merge
Stefan Bauckmeier 2014-12-18 17:28:17 +00:00
commit 8bae5b4944
1 changed files with 5 additions and 1 deletions

View File

@ -78,8 +78,12 @@ function git_prompt_vars {
SCM_GIT_AHEAD='' SCM_GIT_AHEAD=''
SCM_GIT_BEHIND='' SCM_GIT_BEHIND=''
SCM_GIT_STASH='' SCM_GIT_STASH=''
SCM_GIT_ARGUMENTS='--porcelain'
if [ "$DISABLE_UNTRACKED_FILES_DIRTY" == true ]; then
SCM_GIT_ARGUMENTS="$SCM_GIT_ARGUMENTS -uno"
fi
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 $SCM_GIT_ARGUMENTS 2> /dev/null || git status $SCM_GIT_ARGUMENTS 2> /dev/null)"
if [[ -n "${status}" ]] && [[ "${status}" != "\n" ]] && [[ -n "$(grep -v ^# <<< "${status}")" ]]; 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}