Use a double mark for git-svn repos

If the current git repository is a git-svn one (if it has a .git/svn
directory), use ±‡ as a prompt instead of just ±.
This commit is contained in:
Johann Dreo 2013-03-20 13:56:44 +01:00
parent d4d5a9f1d1
commit 79e51ded84

View File

@ -1164,6 +1164,8 @@ _lp_smart_mark()
fi
if [[ "$1" == "git" ]]; then
mark=$LP_MARK_GIT
elif [[ "$1" == "git-svn" ]]; then
mark="$LP_MARK_GIT$LP_MARK_SVN"
elif [[ "$1" == "hg" ]]; then
mark=$LP_MARK_HG
elif [[ "$1" == "svn" ]]; then
@ -1255,6 +1257,12 @@ _lp_set_prompt()
if [[ "$(_lp_are_vcs_disabled)" -eq "0" ]] ; then
LP_VCS="$(_lp_git_branch_color)"
LP_VCS_TYPES="git"
if [[ -n "$LP_VCS" ]]; then
# If this is a git-svn repository
if [[ -d "$(git rev-parse --git-dir 2>/dev/null)/svn" ]]; then
LP_VCS_TYPES="git-svn"
fi
fi # git-svn
if [[ -z "$LP_VCS" ]]; then
LP_VCS="$(_lp_hg_branch_color)"
LP_VCS_TYPES="hg"
@ -1267,11 +1275,11 @@ _lp_set_prompt()
if [[ -z "$LP_VCS" ]]; then
LP_VCS="$(_lp_bzr_branch_color)"
LP_VCS_TYPES="bzr"
fi
fi
fi
fi
fi
fi # bzr
fi # fossil
fi # svn
fi # hg
fi # disabled
if [[ -z "$LP_VCS" ]] ; then
LP_VCS_TYPES=""
else