mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-01-27 12:40:23 +01: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:
@@ -117,7 +117,9 @@ prompt_git() {
|
|||||||
|
|
||||||
zstyle ':vcs_info:*' enable git
|
zstyle ':vcs_info:*' enable git
|
||||||
zstyle ':vcs_info:*' get-revision true
|
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:*' stagedstr '✚'
|
||||||
zstyle ':vcs_info:*' unstagedstr '●'
|
zstyle ':vcs_info:*' unstagedstr '●'
|
||||||
zstyle ':vcs_info:*' formats ' %u%c'
|
zstyle ':vcs_info:*' formats ' %u%c'
|
||||||
|
|||||||
Reference in New Issue
Block a user