Repository: vscode
Issue: VS Code doesn't recognize file changes in the source control view
Labels: info-needed,git,WSL


Type: <b>Bug</b>

This is a follow-up on https://github.com/microsoft/vscode/issues/230382. cc @lszomoru who worked with this before.

The source control view does not show file changes when files are saved. I have to press the "Refresh" button for them to appear. I am using WSL2. I have enabled trace for the output channels below. Of interest might be that I cannot re-create this on another computer using the same setup.

```sh
# Git
2025-01-26 16:25:01.563 [trace] [Repository][onFileChange] Skip running git status because an operation is running.
2025-01-26 16:25:01.564 [debug] [FileEventLogger][onWorkspaceWorkingTreeFileChange] /home/tobias/.local/share/chezmoi/README.md
```

```sh
# Server
2025-01-26 16:24:21.837 [trace] Log level changed to trace
2025-01-26 16:24:21.841 [trace] 

[File Watcher] request stats:

[Summary]
- Recursive Requests:     total: 2, suspended: 0, polling: 0, failed: 0
- Non-Recursive Requests: total: 0, suspended: 0, polling: 0
- Recursive Watchers:     total: 1, active: 1, failed: 0, stopped: 0
- Non-Recursive Watchers: total: 0, active: 0, failed: 0, reusing: 0
- I/O Handles Impact:     total: 1

[Recursive Requests (2, suspended: 0, polling: 0)]:
 /home/tobias/.local/share/chezmoi     	(excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/.hg/store/**,/home/tobias/.vscode-server/extensions/**, includes: <all>, filter: <none>, correlationId: <none>)
 /home/tobias/.local/share/chezmoi/.git	(excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/.hg/store/**,/home/tobias/.vscode-server/extensions/**, includes: <all>, filter: <none>, correlationId: <none>)

[Recursive Watchers (1, active: 1, failed: 0, stopped: 0)]:
 /home/tobias/.local/share/chezmoi                          	(excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/.hg/store/**,/home/tobias/.vscode-server/extensions/**, includes: <all>, filter: <none>, correlationId: <none>)

[Non-Recursive Requests (0, suspended: 0, polling: 0)]:

[Non-Recursive Watchers (0, active: 0, failed: 0, reusing: 0)]:


2025-01-26 16:25:01.442 [trace] [File Watcher ('parcel')] [CHANGED] /home/tobias/.local/share/chezmoi/README.md
2025-01-26 16:25:01.493 [trace] [File Watcher ('parcel')] [CHANGED] /home/tobias/.local/share/chezmoi/README.md
2025-01-26 16:25:01.519 [trace] [File Watcher ('parcel')]  >> normalized [CHANGED] /home/tobias/.local/share/chezmoi/README.md
2025-01-26 16:26:05.102 [trace] Started scanning user extensions {"$mid":1,"fsPath":"/home/tobias/.vscode-server/extensions/extensions.json","external":"file:///home/tobias/.vscode-server/extensions/extensions.json","path":"/home/tobias/.vscode-server/extensions/extensions.json","scheme":"file"}
2025-01-26 16:26:05.183 [trace] Scanned user extensions: 42
```


There seems to be some problem with that `git status` is not run. I have no idea why.


VS Code version: Code 1.96.4 (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 2995)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.74GB (6.05GB free)|
|Process Argv|--crash-reporter-id 662e6746-c8b8-4072-b800-6c4553f42286|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|WSL: Ubuntu|
|OS|Linux x64 5.15.167.4-microsoft-standard-WSL2|
|CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 0)|
|Memory (System)|7.63GB (6.22GB free)|
|VM|0%|
</details><details><summary>Extensions (52)</summary>

Extension|Author (truncated)|Version
---|---|---
jest-snippets|and|1.9.1
jupyter-keymap|ms-|1.1.2
remote-containers|ms-|0.394.0
remote-ssh|ms-|0.116.1
remote-ssh-edit|ms-|0.87.0
remote-wsl|ms-|0.88.5
vscode-remote-extensionpack|ms-|0.26.0
remote-explorer|ms-|0.4.3
remote-server|ms-|1.5.2
errorlens|use|3.22.0
highlight-matching-tag|vin|0.11.0
browserslist|web|1.1.0
vscode-openapi|42C|4.31.0
lit-html|bie|1.11.1
markdown-preview-github-styles|bie|2.1.0
vscode-fish|bma|1.0.38
ruff|cha|2025.4.0
vscode-markdownlint|Dav|0.58.2
vscode-eslint|dba|3.0.10
gitlens|eam|16.2.1
prettier-vscode|esb|11.0.0
code-runner|for|0.12.2
copilot|Git|1.259.0
copilot-chat|Git|0.23.2
go|gol|0.44.0
path-autocomplete|ion|1.25.0
restructuredtext|lex|190.4.5
direnv|mkh|0.17.0
vscode-azureresourcegroups|ms-|0.10.3
vscode-cosmosdb|ms-|0.24.2
vscode-docker|ms-|1.29.4
vscode-kubernetes-tools|ms-|1.3.18
debugpy|ms-|2024.14.0
isort|ms-|2023.10.1
mypy-type-checker|ms-|2024.0.0
python|ms-|2024.22.2
vscode-pylance|ms-|2024.12.1
azure-account|ms-|0.13.0
cmake-tools|ms-|1.19.52
cpptools|ms-|1.22.11
cpptools-extension-pack|ms-|1.3.0
makefile-tools|ms-|0.11.13
test-adapter-converter|ms-|0.2.1
even-betterer-toml|pan|0.21.0
vscode-commons|red|0.0.6
vscode-yaml|red|1.15.0
code-spell-checker|str|4.0.34
vscode-stylelint|sty|1.4.0
shellcheck|tim|0.37.6
simple-rst|tro|1.5.4
cmake|twx|0.0.17
vscode-proto3|zxh|0.5.5

(2 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputs:31217127
9064b325:31222308
copilot_t_ci:31222730

```

</details>

<!-- generated by issue reporter -->