From 0e456639d77611d9e72eee7a0fc5278f2d2345e8 Mon Sep 17 00:00:00 2001 From: Aakash Shah Date: Thu, 23 Jul 2015 13:58:55 -0700 Subject: [PATCH] Update base.theme.bash Fix support for recognizing git when in submodules and the regression when in subdirectories of a git repository. --- 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 2bf16252..989e7cbc 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -47,7 +47,7 @@ RBFU_THEME_PROMPT_SUFFIX='|' function scm { if [[ "$SCM_CHECK" = false ]]; then SCM=$SCM_NONE elif [[ -f .git/HEAD ]]; then SCM=$SCM_GIT - elif which git &> /dev/null && [[ -n "$(git rev-parse 2> /dev/null)" ]]; then SCM=$SCM_GIT + elif which git &> /dev/null && [[ -n "$(git rev-parse --is-inside-work-tree 2> /dev/null)" ]]; then SCM=$SCM_GIT elif [[ -d .hg ]]; then SCM=$SCM_HG elif which hg &> /dev/null && [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$SCM_HG elif [[ -d .svn ]]; then SCM=$SCM_SVN