-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Visual Studio code shouldn't attempt to update git until it has focus #11918
Comments
Since a few releases already, Code doesn't update the git view if it's not in focus. Are you sure you still see this in 1.5.2? My Code stays put, until I focus it. |
Yes I'm certain... Version and platform used are in the original message. |
Is this the internal terminal? Or something like Terminal.app or iTerm.app? |
it is terminal.app started outside of VS. Could it be due to some of the git extension I have installed? |
Mind you, if I modify manually a file outside VS Code (and one in git), neither the editor nor git view show an updated content. But when rebasing, I can see the file being staged changing in the VS Code code view, even though it doesn't have the focus. |
I could reproduce! Definitely a bug, thanks for the persistence, @jyavenard! |
I also experienced this issue with vscode on Linux and using git from a terminal. |
I can no longer reproduce this... But I did a code change which might affect your scenario, @jyavenard. Let me know how it goes. |
If you're referring to the version 6.1 I had it happening just a few hours ago... |
I see a 'git fetch' in the Output's git channel and monaco.d.ts come and go in the Git viewlet without Code having focus. I'm running
|
|
Are you sure they are? Because whenever I'm getting those .git.lock error, at no time vscode is writing on the repo. |
I don't know if there has been any changes recently along the lines of this issue, but I'm running 1.8.0-insider (2016-11-23) on Win7 and the vscode git refresh is taking forever now even if the window has focus. I can commit some files in a separate terminal, go back to vscode and easily wait 30-60 seconds before the git information is correct. |
@dlong500 How slow is |
I'm on VSCode v1.12.1 for Mac and I'm experiencing the same issue when I try to use Git from the terminal, usually when doing a merge:
I can fix this by focusing VSCode and quitting it. VSCode shouldn't hijack Git, especially if it's not in use, and even more so if the Git pane is not even in focus in VSCode. |
Yeah, the same issue
It seems VSCode doesn't release the lock file properly...... |
I'm experiencing the same issues while working with VSC. I can't use any other program like SourceTree or GitKraken because VSC keeps hijacking the index.lock file. |
Please fix this, I've lost commit contents several times because VSCode took the lock during rebases and I probably didn't abort or continue correctly. |
@XavCamp
|
Thanks @SailorMax, I had autofetch to false but I missed autorefresh, I'll give it a try |
1 year and 8 months since this was reported in #901, it is still a major blocker for using VSCode at work. Hopeful for next milestone! 🤞 |
@ricardobeat It was actually fixed during most of that time and broke recently when we moved git to an extension. But we're always happy to have pressuring passion. 👍 |
I just started using VSC this week and have been seeing the |
One final comment on this closed issue. The atom developers have gotten a commit accepted to the git codebase that prevents |
still happening in Version 1.17.1 (1.17.1 |
This is something that has bugged me with XCode for years, and unfortunately, I'm experiencing the same issue with VS.
Typical use case:
You can see that VS attempts to update the git view, even though it hasn't got the focus.
This leads to git operation in the terminal failing due to:
fatal: Unable to create '/Users/jyavenard/Work/Mozilla/mozilla-central/.git/index.lock': File exists. As you can only have one git operation going at a time.
While the likelihood of the failure to occur appears to be much lesser than with xcode, I still get it occasionally.
Solution: VS shouldn't attempt to perform a git operation, unless it has the focus.
The text was updated successfully, but these errors were encountered: