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
Faster status checks for huge git repos #1570
Conversation
Got a small regression: it won't report "dirty" status when a new untracked file is created. |
It seems indeed much, much faster. I'll test a bit further and keep you posted if I find any bug. |
# Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: git.zsh #, ignoring untracked files, which seems to be the primary cause for slowness
@laggyluke @jtheoof Thanks for pointing out that regression. I could not find a way to add untracked files to the dirty check while keeping it fast. OTOH, |
Thanks for this. I'm unsure if I want to accept just yet. The untracked files as dirty is quite useful to me... hmm. |
Is there any way to make it as an option? I agree that dirty untracked files could be useful but faster git status for large repo is too! |
@jtheoof / @yoavweiss if someone (nudge/wink) wants to add a way to disable considering untracked files as dirty to the .zshrc template, I'd consider that as a good way to approach this |
Hi there, I've created a new pull request with option set up in zshrc.template see #1745 |
Thanks, @jtheoof ! Looks great :) |
The current status check for git repos can take several seconds when dealing with huge repos (WebKit in my case). It means a ~10 seconds delay for each command ran on the CLI.
Thanks to some twitter ranting, @paulirish and https://gist.github.com/3898739, I replaced
git status
withgit diff
.AFAICT,
diff
based dirty/clean reports are identical to those ofstatus
, while being an order of magnitude faster (around 0.5 sec for the WebKit repo on my machine).