microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.24k stars 29.3k forks source link

Source control not working #175902

Open lohithrach opened 1 year ago

lohithrach commented 1 year ago

Type: Bug

Source control is not recognizing the changes I made on my files, I've tried refreshing the extensions, restarted VS code. But still doesn't work

VS Code version: Code 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:22:44.506Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2496)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|31.73GB (19.27GB free)| |Process Argv|--crash-reporter-id 2bcb7678-6c91-4d68-af8d-617b98156adf| |Screen Reader|no| |VM|0%|
Extensions (5) Extension|Author (truncated)|Version ---|---|--- terraform|4op|0.2.5 terraform|has|2.25.4 remote-ssh|ms-|0.96.0 remote-ssh-edit|ms-|0.84.0 remote-explorer|ms-|0.2.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 pyindex848:30662994 nodejswelcome1:30587005 282f8724:30602487 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 a9j8j154:30646983 vsccsb:30662443 vscodeenable:30660116 funwalk2:30676043 ```
lszomoru commented 1 year ago

/gifPlease

vscodenpa commented 1 year ago

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

lohithrach commented 1 year ago

Here it is I've attached the recording, where the changes aren't recognised by vscode automatically unless I do git refresh from command palate. blob:https://gifcap.dev/6cee202d-5e11-4850-be43-820319b14598

lohithrach commented 1 year ago

https://www.kapwing.com/w/m1JE-6tD2w

lszomoru commented 1 year ago

@lohithrach, thank you very much for sharing the recording. Could you please enable trace logging for the git extensions so that we try to gather some additional information to track down the root cause:

  1. Open the Command Palette and invoke the "Developer: Set Log Level..." command
  2. Select "Git" from the list of extensions
  3. Select "Trace" as the log level
  4. Try to reproduce the issue
  5. Share the contents of the git output channel.
lszomoru commented 1 year ago

@lohithrach, thank you very much for sharing the recording. Could you please enable trace logging for the git extensions so that we try to gather some additional information to track down the root cause:

  1. Open the Command Palette and invoke the "Developer: Set Log Level..." command
  2. Select "Git" from the list of extensions
  3. Select "Trace" as the log level
  4. Try to reproduce the issue
  5. Share the contents of the git output channel.
lohithrach commented 1 year ago

Hi @lszomoru, here is the output content of logs

2023-03-27 06:36:48.179 [trace] Operation start: Status (blocking: false, readOnly: false; retry: false; showProgress: true) 2023-03-27 06:36:48.251 [warning] getRemotes() - ENOENT: no such file or directory, open '/home/l01/terraform/terraform-EfficacyService/--git-common-dir/config' 2023-03-27 06:36:48.316 [info] > git config --get commit.template [1ms] 2023-03-27 06:36:48.317 [info] > git remote --verbose [65ms] 2023-03-27 06:36:48.399 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname) refs/heads/api_gw-change refs/remotes/api_gw-change [1ms] 2023-03-27 06:36:48.447 [info] > git rev-list --left-right --count api_gw-change...origin/api_gw-change [12ms] 2023-03-27 06:36:48.507 [info] > git status -z -uall [16ms] 2023-03-27 06:36:48.510 [trace] Operation end: Status (blocking: false, readOnly: false; retry: false; showProgress: true) 2023-03-27 06:41:06.777 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2023-03-27 06:41:06.912 [trace] Operation start: Show (blocking: false, readOnly: true; retry: false; showProgress: false) 2023-03-27 06:41:06.912 [trace] Operation start: GetObjectDetails (blocking: false, readOnly: true; retry: false; showProgress: false) 2023-03-27 06:41:06.913 [info] > git show --textconv HEAD:versions.tf [63ms] 2023-03-27 06:41:06.914 [trace] Operation end: Show (blocking: false, readOnly: true; retry: false; showProgress: false) 2023-03-27 06:41:06.915 [info] > git ls-tree -l HEAD -- /home/l01/terraform/terraform-EfficacyService/versions.tf [4ms] 2023-03-27 06:41:06.916 [trace] Operation end: GetObjectDetails (blocking: false, readOnly: true; retry: false; showProgress: false) 2023-03-27 06:41:07.223 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2023-03-27 06:41:07.223 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2023-03-27 06:41:07.223 [trace] [svte] Repository for editor resource /home/l01/terraform/terraform-EfficacyService/versions.tf already exists: /home/l01/terraform/terraform-EfficacyService 2023-03-27 06:41:11.087 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2023-03-27 06:41:11.087 [trace] [svte] Repository for editor resource /home/l01/terraform/terraform-EfficacyService/versions.tf already exists: /home/l01/terraform/terraform-EfficacyService 2023-03-27 06:41:11.088 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2023-03-27 06:41:11.088 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2023-03-27 06:41:11.088 [trace] [svte] Repository for editor resource /home/l01/terraform/terraform-EfficacyService/versions.tf already exists: /home/l01/terraform/terraform-EfficacyService 2023-03-27 06:41:27.550 [trace] Operation start: Status (blocking: false, readOnly: false; retry: false; showProgress: true) 2023-03-27 06:41:27.595 [warning] getRemotes() - ENOENT: no such file or directory, open '/home/l01/terraform/terraform-EfficacyService/--git-common-dir/config' 2023-03-27 06:41:27.641 [info] > git config --get commit.template [1ms] 2023-03-27 06:41:27.641 [info] > git remote --verbose [46ms] 2023-03-27 06:41:27.788 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname) refs/heads/api_gw-change refs/remotes/api_gw-change [8ms] 2023-03-27 06:41:27.871 [info] > git rev-list --left-right --count api_gw-change...origin/api_gw-change [1ms] 2023-03-27 06:41:27.993 [info] > git status -z -uall [39ms] 2023-03-27 06:41:27.997 [trace] Operation end: Status (blocking: false, readOnly: false; retry: false; showProgress: true)

lohithrach commented 1 year ago

The git output is only showing when I do the git refresh from the command palette manually every time. VScode is not automatically picking up the changes from the files that I modify.

lszomoru commented 1 year ago

@lohithrach, thank you very much for sharing the logs. Looking at the logs, it seems to me that the git extension never receives the file system event that the file has changed, hence the code to refresh the Source Control view is not being executed.

Could you please follow the steps in this wiki, to enable trace logging for VS Code and share the file system event logs. Thanks!

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

lohithrach commented 1 year ago

log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] [raw] ["change"] globalStorage log.ts:380 TRACE [File Watcher (node.js)] [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage log.ts:380 TRACE [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\l01\AppData\Roaming\Code\User\globalStorage

lohithrach commented 1 year ago

2023-04-05 01:09:21.018 [info]

2023-04-05 01:09:21.196 [info] Extension host agent started. 2023-04-05 01:09:21.434 [error] [File Watcher (node.js)] Failed to watch /home/l01/.vscode-server/data/Machine for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/.vscode-server/data/Machine') 2023-04-05 01:09:21.437 [error] [File Watcher (node.js)] Failed to watch /home/l01/.vscode-server/data/Machine/settings.json for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/.vscode-server/data/Machine/settings.json') 2023-04-05 01:09:21.503 [error] [File Watcher (node.js)] Failed to watch /home/l01/.vscode-server/extensions for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/.vscode-server/extensions') 2023-04-05 01:09:21.546 [error] [File Watcher (node.js)] Failed to watch /home/l01/.vscode-server/extensions/extensions.json for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/.vscode-server/extensions/extensions.json') 2023-04-05 01:09:21.930 [info] [127.0.0.1][01cc1fe9][ManagementConnection] New connection established. 2023-04-05 01:09:22.450 [info] [127.0.0.1][a016a65f][ExtensionHostConnection] New connection established. 2023-04-05 01:09:22.477 [info] [127.0.0.1][a016a65f][ExtensionHostConnection] <24728> Launched Extension Host Process. 2023-04-05 01:09:25.055 [error] [File Watcher (node.js)] Failed to watch /home/l01/.vscode-server/data/Machine/settings.json for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/.vscode-server/data/Machine/settings.json') 2023-04-05 01:09:28.841 [error] [File Watcher (node.js)] Failed to watch /home/l01/terraform/terraform-deploy/.git for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/terraform/terraform-deploy/.git') 2023-04-05 01:10:18.802 [info] [127.0.0.1][01cc1fe9][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed. 2023-04-05 01:10:20.886 [info] [127.0.0.1][a016a65f][ExtensionHostConnection] <24728> Extension Host Process exited with code: 0, signal: null. 2023-04-05 01:10:20.887 [info] Cancelling previous shutdown timeout 2023-04-05 01:10:20.887 [info] Last EH closed, waiting before shutting down 2023-04-05 01:10:32.068 [info] Got delay-shutdown request while in shutdown timeout, delaying 2023-04-05 01:10:32.068 [info] Cancelling previous shutdown timeout 2023-04-05 01:10:33.562 [info] [127.0.0.1][5bb330e2][ManagementConnection] New connection established. 2023-04-05 01:10:34.249 [info] [127.0.0.1][368565e0][ExtensionHostConnection] New connection established. 2023-04-05 01:10:34.276 [info] [127.0.0.1][368565e0][ExtensionHostConnection] <27515> Launched Extension Host Process. 2023-04-05 01:10:36.842 [error] [File Watcher (node.js)] Failed to watch /home/l01/.vscode-server/data/Machine/settings.json for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/.vscode-server/data/Machine/settings.json') 2023-04-05 01:10:40.587 [error] CodeExpectedError: Could not find pty on pty host at S.L (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:27:6849) at S.updateIcon (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:27:2680) at Object.call (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:17:5043) at l.s (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:15:5412) at l.q (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:15:4915) at /home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:15:4326 at n.invoke (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:11:145) at E.deliver (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:11:2070) at c.fire (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:11:1708) at process.T (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:9:20949) at process.emit (node:events:526:28) at emit (node:internal/child_process:938:14) at processTicksAndRejections (node:internal/process/task_queues:84:21) 2023-04-05 01:10:40.588 [error] CodeExpectedError: Could not find pty on pty host at S.L (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:27:6849) at S.updateTitle (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:27:2630) at Object.call (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:17:5043) at l.s (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:15:5412) at l.q (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:15:4915) at /home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:15:4326 at n.invoke (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:11:145) at E.deliver (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:11:2070) at c.fire (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:11:1708) at process.T (/home/l01/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/out/vs/platform/terminal/node/ptyHostMain.js:9:20949) at process.emit (node:events:526:28) at emit (node:internal/child_process:938:14) at processTicksAndRejections (node:internal/process/task_queues:84:21) 2023-04-05 01:10:41.328 [error] [File Watcher (node.js)] Failed to watch /home/l01/terraform/terraform-deploy/.git for changes using fs.watch() (Error: EMFILE: too many open files, watch '/home/l01/terraform/terraform-deploy/.git') 2023-04-05 01:15:32.069 [info] New EH opened, aborting shutdown 2023-04-05 01:20:36.833 [trace] Started scanning user extensions {"$mid":1,"fsPath":"/home/l01/.vscode-server/extensions/extensions.json","external":"file:///home/l01/.vscode-server/extensions/extensions.json","path":"/home/l01/.vscode-server/extensions/extensions.json","scheme":"file"} 2023-04-05 01:20:36.836 [trace] Scanned user extensions: 1 2023-04-05 01:25:37.179 [trace] Started scanning user extensions {"$mid":1,"fsPath":"/home/l01/.vscode-server/extensions/extensions.json","external":"file:///home/l01/.vscode-server/extensions/extensions.json","path":"/home/l01/.vscode-server/extensions/extensions.json","scheme":"file"} 2023-04-05 01:25:37.185 [trace] Scanned user extensions: 1

lohithrach commented 1 year ago

@lszomoru please look into this

lszomoru commented 1 year ago

@lohithrach, sorry for not getting back to you on this until now. It looks like you have shared the output from the host and not from the remote server. Here are the steps that you should follow to collect the logs from the remote server.