mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-23 06:10:08 +00:00
agnoster: speedup for repos with enabled hide-dirty
For huge repos, status checking can take many seconds. It's pretty annoying to have such delay on each prompt message inside such repo. agnoster uses parse_git_drity which respect the oh-my-zsh.hide-dirty flag. Thus, we don't perform an expensive check in this case. However, it doesn't solve the original problem because we still have a delay because of check-for-changes. The line should be executed only for dirty repos.
This commit is contained in:
parent
c99844d848
commit
50b729c0c0
1 changed files with 3 additions and 1 deletions
|
@ -117,7 +117,9 @@ prompt_git() {
|
|||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' get-revision true
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
if [[ -n $dirty ]]; then
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
fi
|
||||
zstyle ':vcs_info:*' stagedstr '✚'
|
||||
zstyle ':vcs_info:*' unstagedstr '●'
|
||||
zstyle ':vcs_info:*' formats ' %u%c'
|
||||
|
|
Loading…
Reference in a new issue