Update base.theme.bash

Fix support for recognizing git when in submodules and the regression when in subdirectories of a git repository.
pull/531/head
Aakash Shah 2015-07-23 13:58:55 -07:00
parent b1b559f173
commit 0e456639d7
1 changed files with 1 additions and 1 deletions

View File

@ -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