-
-
Notifications
You must be signed in to change notification settings - Fork 981
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
Occasionally can't git pull when switching branches #283
Comments
Yikes, that's annoying. Is there any more information you can provide me, e.g. related git configuration (pull.rebase comes to mind, perhaps others?), repository size, etc? I've not encountered this myself, but I'll see if I can reproduce. |
In git I have The repository where I keep getting that isn't huge. The folder is 156M with 1080 commits. |
Thanks for the extra info, now, I haven't gotten around to reproducing this yet, but I have an idea as to what might be the cause. In pure.zsh#L84 we check if the user executed git At this point the zsh alias is already expanded (so we know Can you still reproduce if you change |
After testing it for a while the change seems to fix the problem. I guess the easiest fix for me would be to define |
Thanks for confirming, @Hilzu. I actually have an idea on how we can fix this issue for you and anyone else in your situation. The fix involves us parsing the git aliases once whenever we enter a new git directory via |
* Parse git aliases for better pull/fetch detection Fixes #283. * Only perform check when pattern is valid If `prompt_pure_git_fetch_pattern` is unset, the pattern is invalid. This did not produce errors on my machine, even when not guarding against this case, but better safe than sorry.
* Parse git aliases for better pull/fetch detection Fixes sindresorhus#283. * Only perform check when pattern is valid If `prompt_pure_git_fetch_pattern` is unset, the pattern is invalid. This did not produce errors on my machine, even when not guarding against this case, but better safe than sorry.
General information
I have:
Problem description
Occasionally when switching branches and immediately trying to
git pull
the command fails. It's most likely caused by the async git functionality trying to fetch changes at the same time.Reproduction steps
My
.zshrc
:The text was updated successfully, but these errors were encountered: