vscode: Source Control does not refresh status automatically when working on WSL.

Issue Type: Bug

Whenever any changes are made to a already committed file or a new file is created or basically any changes are made in a git repository not from the source control GUI, the changes made are not synced with VS Code Explorer and need to hit refresh manually to see changes such as U or M tags in the file explorer or file tab.

Steps to reproduce:

  1. Open any git repository on WSL.
  2. Create a new file or edit any previously committed file.

https://user-images.githubusercontent.com/35092213/107919652-b4d91a00-6f91-11eb-86c8-daa4c211f531.mp4

Expected Result - The changes should be synced with Source Control and tags should change accordingly to M or U automatically.

Actual Result - Nothing happens. The clock symbol on source control appears for less than a second when a new file is created from the explorer but still nothing happens. The clock does not even show when creating files from the terminal. Changes are visible on the source control tab only after hitting refresh manually.

Does it work with extensions disabled - Unable to verify. When loaded without extensions the WSL side asks to enable WSL-Remote extension and reload. After reload all extensions get enabled.

PS: This issue does not occur on the windows side of VS Code when working on the same repo and using WSL as terminal. Works as expected.

VS Code version: Code 1.53.2 (622cb03f7e070a9670c94bae1a45d78d7181fbd4, 2021-02-11T11:48:04.245Z) OS version: Windows_NT x64 10.0.19042 Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2

System Info
Item Value
CPUs AMD A6-7310 APU with AMD Radeon R4 Graphics (4 x 1996)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 6.97GB (0.90GB free)
Process Argv –folder-uri=vscode-remote://wsl+Ubuntu/home/suyash1266/CodeChef-Problems/FEB21LC --remote=wsl+Ubuntu --crash-reporter-id 39dad4d6-21bf-4e36-bb33-6e7cdb0d4c56
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.4.72-microsoft-standard-WSL2
CPUs AMD A6-7310 APU with AMD Radeon R4 Graphics (4 x 1996)
Memory (System) 5.38GB (4.09GB free)
VM 0%
Extensions (29)
Extension Author (truncated) Version
better-comments aar 2.1.0
bracket-pair-colorizer-2 Coe 0.2.0
discord-vscode icr 5.2.0
better-cpp-syntax jef 1.15.5
fluent-icons mig 0.0.6
remote-wsl ms- 0.53.4
vscode-icons vsc 11.1.0
gitignore cod 0.6.0
vscode-markdownlint Dav 0.38.0
githistory don 0.6.14
gitlens eam 11.2.1
vscode-pull-request-github Git 0.23.1
gc-excelviewer Gra 3.0.41
python ms- 2021.1.502429796
vscode-pylance ms- 2021.2.2
jupyter ms- 2020.12.414227025
cpptools ms- 1.2.0
vsliveshare ms- 1.0.3629
vsliveshare-audio ms- 0.1.91
vsliveshare-pack ms- 0.4.0
indent-rainbow ode 7.5.0
java red 0.75.0
sonarlint-vscode Son 1.20.1
vscodeintellicode Vis 1.2.11
vscode-java-debug vsc 0.31.0
vscode-java-dependency vsc 0.18.0
vscode-java-pack vsc 0.12.1
vscode-java-test vsc 0.28.0
vscode-maven vsc 0.27.1

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt617cf:30253240
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30256636
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt600cf:30251589

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 6
  • Comments: 17 (1 by maintainers)

Most upvoted comments

@eamodio They don’t. Want me to open a new ticket?

If you’re under the impression that setting "git.autofetch" to false (the apparent default value) is the solution, then maybe you can shed some light on why true (a setting that, I assume, automatically displays remote changes in the VCS panel) has the opposite effect and results in no changes making it into the VCS panel?

Yeah – agree, the suggestions above should resolve this.

Perhaps some one can confirm this fix worked for them. I had to remove auto fetch from my settings.json and now Source Control is working ok.

@Suyash1266 @karanmartian @oliversalzburg @vystepanenko, perhaps one of you can try the above?

Change "git.autofetch": true to "git.autofetch": false.

Works for me too. Just do not forget reload VS Code after changing this setting

thnx man! @JDTAY

Perhaps some one can confirm this fix worked for them. I had to remove auto fetch from my settings.json and now Source Control is working ok.

@Suyash1266 @karanmartian @oliversalzburg @vystepanenko, perhaps one of you can try the above?

Change "git.autofetch": true to "git.autofetch": false.

Have same issue. Source Control does not refresh automatically. Need to trigger Refresh button manually to see changes in Source Control Projcet all under Linux file system /home

Version: 1.59.0-insider (user setup) Commit: e8a59bc6f920e731b47f0bc72263e82aba8b796e Date: 2021-07-22T05:14:01.507Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Windows_NT x64 10.0.19043