1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-23 14:20: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:
Andrey Akinshin 2018-06-17 17:53:01 +03:00
parent c99844d848
commit 50b729c0c0
No known key found for this signature in database
GPG key ID: 0F88A0476EF217EF

View file

@ -117,7 +117,9 @@ prompt_git() {
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' get-revision 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'