-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
git: parse_git_dirty is too slow #5066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ditto. |
I'd be fine with even having it's update frequency not be every second, but every XX seconds. |
Having the same issue, there's < 30 changes in my Git Repo :( |
Yep, my change list is usually fairly small too so this would be nice to get boosted. |
I'm having the same issue, again with a small number of local changes in the git repo. Made local modifications to workaround for now but using a plugin manager, so changes would be wiped out on next update :( |
You can limit the git command with a timeout, for example: Lines 7 to 11 in f6bc949
- GIT_OPTIONAL_LOCKS=0 command git "$@"
+ GIT_OPTIONAL_LOCKS=0 command timeout 1s git "$@" |
Note that you can disable But yeah, it should be made faster. |
Having this issue as well. @mcornella idea of the git config option to disable this feature works as a workaround on my end though thankfully. |
I am having the same issue and @mcornella 's solution of git config works. But I would like to understand a bit more about why this works. How is the option |
Thanks @mcornella I followed the tip of disabling checking for dirty on a big repo, I'm not really bothered as I usually check the status manually anyway, I had actually forgotten the little |
People coming across this are also likely to want to add:
See https://unix.stackexchange.com/questions/565905/oh-my-zshs-prompt-is-slow-how-to-fix-this |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
When opening folders that contain large git repositories, like the linux-kernel, git_prompt_info and parse_git_dirty take >3 seconds to run.
Waiting >3 seconds is pretty much unacceptable.
Either adding a flag for disabling slow git functionality or removing slow functionality altogether are acceptable alternatives to me.
Currently I'm using a work-around: https://gist.github.com/msabramo/2355834
But since oh-my-zsh auto-updates over git I'm going to have merge conflicts/my changes disregarded.
The text was updated successfully, but these errors were encountered: