Open jpshack-at-palomar opened 1 month ago
Originally thought this was https://github.com/microsoft/vscode/issues/204387 as same symptoms.
Ha! The problem appears just to be that for some reason on MacOS the initial slash is getting trimmed in the executable path.
$ which git
/opt/homebrew/bin/git
But see in the logs references to the git executable have opt/homebrew/bin/git
When I add this to settings.json, it works.
"git.path": "/opt/homebrew/bin/git"
@jpshack-at-palomar, is there any reason why you have set the git.path
setting? That should not be necessary.
The only reason I set it was to troubleshoot this issue. The issue occurred with no setting. I could see from the logging that prior to the setting VS Code was using opt/homebrew/bin/git
as the path. I added the setting to satisfy myself that the issue was not the missing /
but a deeper problem. However I was surprised to find that adding the setting with git.path: /opt/homebrew/bin/git
actually resolved the issue. So there is a bug somewhere in the VS Code configuration discovery that took a '$ which git' result of /opt/homebrew/bin/git
and trimmed the initial slash with the result that repository discovery was failing. It is that bug that this issue is reporting.
Thank to the clarifications.
I am using git installed using homebrew and here is the snippet from my log without having the git.path
setting set:
2024-11-01 10:19:54.685 [info] [main] Log level: Info
2024-11-01 10:19:55.128 [info] [main] Validating found git in: "/opt/homebrew/bin/git"
2024-11-01 10:19:55.213 [info] [main] Using git "2.46.0" from "/opt/homebrew/bin/git"
So without specifying the git.path
setting, git should be correctly discovered.
Could you clear the git.path
setting on your machine and see if your log would match what I am seeing?
All of the traces I shared previously are WITHOUT the git.path
setting. I am happy to provide any additional logging you need to hunt down the issue.
Type: Bug
Open any folder in which there is an initialized git repo. I have not yet found root cause but current theory is that the extension cannot handle a symlinked git binary as with homebrew.
I am using default settings for git extension on a completely clean install.
VS Code version: Code - Insiders 1.95.0-insider (fe997185b5e6db94693ed6ef5456cfa4e8211edf, 2024-10-23T05:06:13.568Z) OS version: Darwin arm64 24.0.0 Modes:
System Info
|Item|Value| |---|---| |CPUs|Apple M1 (8 x 2400)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|2, 2, 3| |Memory (System)|8.00GB (0.10GB free)| |Process Argv|--log vscode.git=trace --crash-reporter-id f58ace6f-1116-4b33-80b7-c3f39217abbf| |Screen Reader|no| |VM|0%|
A/B Experiments
``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 vsaa593cf:30376535 py29gd2263:31024238 c4g48928:30535728 962ge761:30841072 pythongtdpath:30726887 pythonnoceb:30776497 asynctok:30898717 dsvsc014:30777825 dsvsc015:30821418 pythonmypyd1:30859725 h48ei257:31000450 pythontbext0:30879054 cppperfnew:30980852 pythonait:30973460 0ee40948:31013168 dvdeprecation:31040973 dwnewjupyter:31046869 2f103344:31071589 nb_pri_only:31057983 nativerepl1:31134653 refactort:31084545 pythonrstrctxt:31093868 wkspc-onlycs-t:31132770 nativeloc1:31118317 wkspc-ranged-t:31151552 cf971741:31144450 e80f6927:31120813 autoexpandse:31146404 12bdf347:31141542 iacca1:31150324 notype1:31143044 dwcopilot:31158714 g7688163:31155431 ```Logs:
The logs are noisy because of all of the sub-directories the extension is searching--but I can confirm that there is indeed a git repo: