microsoft / vscode

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

Git Changes not loading, neither showing current branch on the status bar. #205330

Closed rahuljrcoforge closed 3 months ago

rahuljrcoforge commented 7 months ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Open VS code with any repository
  2. Its continuously shows loading indicator on the left bar but nothing happens. Attached screenshot image

Adding one more snap image

All these options are unresponsive image

stagefright5 commented 7 months ago

Also, the branch is not visible in the Source control extension view (sidebar)

lszomoru commented 7 months ago

Could you please enable trace logging for the vscode.git extension:

rahuljrcoforge commented 7 months ago

@lszomoru 2024-02-17 10:18:33.784 [info] Log level: Trace 2024-02-17 10:18:33.784 [info] Validating found git in: "C:\Program Files\Git\cmd\git.exe" 2024-02-17 10:18:34.465 [info] Using git "2.31.1.windows.1" from "C:\Program Files\Git\cmd\git.exe" 2024-02-17 10:18:34.465 [trace] [swf] Scan workspace folders: [d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal] 2024-02-17 10:18:34.466 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2024-02-17 10:18:34.466 [trace] [swsf] Scan workspace sub folders. autoRepositoryDetection=true 2024-02-17 10:18:34.466 [trace] [swsf] Workspace folder: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:18:34.467 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:18:34.481 [trace] [swsf] Workspace scan settings: repositoryScanMaxDepth=1; repositoryScanIgnoredFolders=[node_modules]; scanRepositories=[] 2024-02-17 10:18:34.481 [trace] [swsf] Workspace scan sub folders: [d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sfdx, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.vscode, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\config, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\force-app, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\pkg, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\scripts] 2024-02-17 10:19:23.873 [info] > git rev-parse --show-toplevel [49329ms] 2024-02-17 10:19:23.874 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:19:39.632 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2024-02-17 10:19:44.578 [info] > git rev-parse --git-dir --git-common-dir [4136ms] 2024-02-17 10:19:44.618 [info] Open repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:19:44.619 [trace] Operation start: Status (blocking: false, readOnly: false; retry: false; showProgress: true) 2024-02-17 10:19:44.625 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky 2024-02-17 10:19:44.899 [trace] [swf] Scan workspace folders: [] 2024-02-17 10:50:57.495 [info] Log level: Trace 2024-02-17 10:50:57.495 [info] Validating found git in: "C:\Program Files\Git\cmd\git.exe" 2024-02-17 10:50:57.785 [info] Using git "2.31.1.windows.1" from "C:\Program Files\Git\cmd\git.exe" 2024-02-17 10:50:57.785 [trace] [swf] Scan workspace folders: [d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal] 2024-02-17 10:50:57.785 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2024-02-17 10:50:57.785 [trace] [swsf] Scan workspace sub folders. autoRepositoryDetection=true 2024-02-17 10:50:57.786 [trace] [swsf] Workspace folder: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:50:57.786 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:50:57.790 [trace] [swsf] Workspace scan settings: repositoryScanMaxDepth=1; repositoryScanIgnoredFolders=[node_modules]; scanRepositories=[] 2024-02-17 10:50:57.791 [trace] [swsf] Workspace scan sub folders: [d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sfdx, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.vscode, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\config, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\force-app, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\pkg, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\scripts] 2024-02-17 10:50:57.990 [info] > git rev-parse --show-toplevel [182ms] 2024-02-17 10:50:57.990 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:50:58.137 [info] > git rev-parse --git-dir --git-common-dir [132ms] 2024-02-17 10:50:58.153 [info] Open repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:50:58.154 [trace] Operation start: Status (blocking: false, readOnly: false; retry: false; showProgress: true) 2024-02-17 10:50:58.157 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky 2024-02-17 10:51:21.175 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/release/UR8/QA refs/remotes/release/UR8/QA [22909ms] 2024-02-17 10:51:21.177 [info] > git rev-parse --show-toplevel [22994ms] 2024-02-17 10:51:21.177 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:21.177 [trace] Repository for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal already exists: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:21.177 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf 2024-02-17 10:51:21.178 [info] > git config --get commit.template [23008ms] 2024-02-17 10:51:21.190 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2024-02-17 10:51:21.819 [trace] Operation start: CheckIgnore (blocking: false, readOnly: true; retry: false; showProgress: false) 2024-02-17 10:51:21.835 [info] > git rev-parse --show-toplevel [523ms] 2024-02-17 10:51:21.836 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:21.836 [trace] Repository for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal already exists: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:21.836 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sfdx 2024-02-17 10:51:22.372 [info] > git rev-parse --show-toplevel [434ms] 2024-02-17 10:51:22.372 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sfdx is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:22.372 [trace] Repository for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal already exists: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:22.372 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.vscode 2024-02-17 10:51:23.459 [trace] [swf] Scan workspace folders: [] 2024-02-17 10:51:23.641 [info] > git rev-parse --show-toplevel [284ms] 2024-02-17 10:51:23.642 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.vscode is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:23.642 [trace] Repository for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal already exists: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:51:23.642 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\config 2024-02-17 10:51:23.679 [info] > git check-ignore -v -z --stdin [1860ms] 2024-02-17 10:51:23.683 [trace] Operation end: CheckIgnore (blocking: false, readOnly: true; retry: false; showProgress: false) 2024-02-17 10:55:33.572 [info] Log level: Trace 2024-02-17 10:55:33.572 [info] Validating found git in: "C:\Program Files\Git\cmd\git.exe" 2024-02-17 10:55:33.572 [info] Using git "2.31.1.windows.1" from "C:\Program Files\Git\cmd\git.exe" 2024-02-17 10:55:33.572 [trace] [swf] Scan workspace folders: [d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal] 2024-02-17 10:55:33.572 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2024-02-17 10:55:33.572 [trace] [swsf] Scan workspace sub folders. autoRepositoryDetection=true 2024-02-17 10:55:33.572 [trace] [swsf] Workspace folder: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:33.573 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:33.573 [trace] [swsf] Workspace scan settings: repositoryScanMaxDepth=1; repositoryScanIgnoredFolders=[node_modules]; scanRepositories=[] 2024-02-17 10:55:33.573 [trace] [swsf] Workspace scan sub folders: [d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sfdx, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.vscode, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\config, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\force-app, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\pkg, d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal\scripts] 2024-02-17 10:55:33.636 [info] > git rev-parse --show-toplevel [172ms] 2024-02-17 10:55:33.636 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:58.293 [info] > git rev-parse --git-dir --git-common-dir [24611ms] 2024-02-17 10:55:58.309 [info] Open repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:58.309 [trace] Operation start: Status (blocking: false, readOnly: false; retry: false; showProgress: true) 2024-02-17 10:55:58.311 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky 2024-02-17 10:55:58.328 [trace] [svte] Scan visible text editors. autoRepositoryDetection=true 2024-02-17 10:55:59.094 [trace] [swf] Scan workspace folders: [] 2024-02-17 10:55:59.142 [info] > git rev-parse --show-toplevel [598ms] 2024-02-17 10:55:59.143 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.husky is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:59.144 [trace] Repository for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal already exists: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:59.144 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf 2024-02-17 10:55:59.145 [info] > git config --get commit.template [629ms] 2024-02-17 10:55:59.684 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/release/UR8/QA refs/remotes/release/UR8/QA [384ms] 2024-02-17 10:55:59.687 [info] > git rev-parse --show-toplevel [423ms] 2024-02-17 10:55:59.688 [trace] Repository root for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sf is: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:59.690 [trace] Repository for path d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal already exists: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal 2024-02-17 10:55:59.692 [trace] Opening repository: d:\MyDocs\VSCodeProjects\REVATURE\Unified Portal.sfdx

PEZ commented 6 months ago

I have this too. It seems I triggered it by opening the Contributors pane:

image

Because in some other projects where the Git icon is not showing a watch, if I open the Contributors pane the watch appears. And never disappears. Not even restarting VS Code helps.

PEZ commented 6 months ago

And never disappears. Not even restarting VS Code helps.

Sorry, I was being stupid. The reason it happens after restart is that the contributors pane was open. If I close it and reload the VS Code window, the watch disappears.

Anyway, in my case it seems to be that populating the Contributors pane hangs somehow. Nothing is logged to the Git output channel when I expand the pane, triggering the hang. Not even with trace on.

lszomoru commented 3 months ago

@PEZ, the "Contributors" view is being contributed by a 3rd party extension (maybe GitLens?) so in case it hangs I would suggest that you reach out to the extension author to further investigate the issue. Any extension can use VS Code extension API to display the "loading indicator" on "Source Control" activity bar icon.

lszomoru commented 3 months ago

@rahuljrcoforge, apologies for not getting back to you on this until now. Are you still able to reproduce this issue with the latest VS Code stable release? Thanks!

VSCodeTriageBot commented 3 months 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!