From c6bb8507adeab4bfa479ef24fd6ca38a1aad2e1a Mon Sep 17 00:00:00 2001 From: Eduardo Bellido Bellido Date: Tue, 26 Aug 2014 00:23:27 +0200 Subject: [PATCH] Fix regression checking git repo status --- themes/base.theme.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index b2d7639d..54ab2f54 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -75,7 +75,7 @@ function git_prompt_vars { SCM_GIT_STASH='' 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)" - if [[ -n "${status}" ]] && [[ "${status}" != "\n" ]]; then + if [[ -n "${status}" ]] && [[ "${status}" != "\n" ]] && [[ -n "$(grep -v ^# <<< "${status}")" ]]; then SCM_DIRTY=1 SCM_STATE=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY} else