diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-10-28 11:34:36 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-10-28 11:59:38 +0100 |
commit | 83d1ed2a61e96d581ebdba4055437d78ae0e4a83 (patch) | |
tree | 1b9f7ef0e55ab2e90d66ef87b56582bb4f988936 | |
parent | 4ebb0164d2e15645866de50b3b1f024729e37831 (diff) |
Do not check {git,svn} {status,branch}
-rw-r--r-- | 01_Functions.zsh | 10 | ||||
-rw-r--r-- | 12_Prompts.zsh | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index b5b0fce..0cb57b0 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -59,6 +59,10 @@ get_git_branch () { local my_git_branch REBASE + if [ ! -z "$DO_NOT_CHECK_GIT_BRANCH" ] + then return + fi + [ "$( ( git-ls-tree HEAD . 2>&- ; git-ls-files . 2>&- ) | head -n 1)" == "" ] && return # Rebase in progress ? @@ -90,7 +94,11 @@ get_git_branch () get_git_status () { local my_git_status cached not_up_to_date managment_folder - + + if [ ! -z "$DO_NOT_CHECK_GIT_STATUS" ] + then return + fi + if [ "$(git-rev-parse --git-dir)" == "." ] ; then echo "$git_colors[managment_folder]" return diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 4a6c19e..ef9f319 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -103,8 +103,11 @@ old_precmd() SVNREVSIZE=${#${SVNREV:+ r$SVNREV}} if [ "$SVNREV" != "" ] then - SVNSTATUS="$(svn diff 2>&-)" - SVNSTATUS=${${SVNSTATUS:+$prompt_colors[not_up_to_date]}:-$prompt_colors[up_to_date]} + if [ -z "$DO_NOT_CHECK_SVN_STATUS" ] + then + SVNSTATUS="$(svn diff 2>&-)" + SVNSTATUS=${${SVNSTATUS:+$prompt_colors[not_up_to_date]}:-$prompt_colors[up_to_date]} + fi fi SVNREV=${SVNREV:+$C_$prompt_colors[doubledot]$_C $C_$SVNSTATUS$_C"r"$SVNREV} [ "$DEBUG" = "yes" ] && echo |