kahole / edamagit

Magit for VSCode

Home Page:https://marketplace.visualstudio.com/items?itemName=kahole.magit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Magit Status windows does not show

nightscape opened this issue · comments

Hi @kahole,

coming from Emacs, I was thrilled to see that there is a Magit port for VS Code!
It was working very well for me, until a few weeks ago it stopped functioning, the Status window just doesn't appear.
I tried various things, among them running a fresh VS Code with no other plugins installed, tried in various repos, all to no avail.
I checked all buffers of the Output tab, but didn't find anything that would indicate an error.

Does anybody observe the same issues with the newest VS Code version(s)?
Is there any place where I can find additional debug output?

Maybe try checking the extension host logs, if you haven't already done so.

cmd-shift-p -> Show Logs -> Extension Host

it was observed in my box too. (Windows 11, VS Code 1.74.3, edamagit v0.6.36)

here is a log message from the extension host.

2023-01-29 19:37:58.575 [info] ExtensionService#_doActivateExtension kahole.magit, startup: false, activationEvent: 'onCommand:magit.status'

I'm seeing the same behavior with all Magit commands that I've tested so far. Aside from the previously noted log message (which I suspect is just the extension getting activated for the first time), I don't see anything in the Extension Host logs or the developer console. This has been going on for what I'm pretty sure is at least a couple of months.

System info:

Windows 10
VS Code 1.75.1
Edamagit 0.6.36

Edamagit needs to be able to reach git on the system. Perhaps it's not finding it in your guys' Windows setup. Make sure Git is in the "path". Perhaps run vscode from WSL.

I don't run Windows, so not easy for me to debug this. I might need some help.

Git is definitely in the PATH on my machine; I'm able to run it from any terminal I open, whether that's VS Code, Windows Terminal, or cmd.exe. If you can point me at a rough starting place to look in the code, I'm happy to try to help debug; I haven't done much VS Code extension development, but I'm pretty OK at JavaScript/TypeScript in general.

It seems due to issue that git is not found. findGitWin32 try to find git in some 'standard' directory. However if git is not installed in those directory, for example installed using scoop, findGitWin32InPath and findSpecificGit will be called. It looks like the which('git.exe'... does not return the path to git.

Is it possible let user specify the git to use? like git.path

It seems you where right @ShuguangSun, I had the same issue and after adding a config to specify git path on windows it works. I have created a pull request for it.

Part of the issue seems to be that which already tries to append various file extensions, so which('git.exe') looks for git.exe.exe. That may not be the only issue here, but my debugger is being rather uncooperative at the moment, so it may take a bit to sort out the remaining issues.

@blm768 did you try to update edamagit and add the path in the new win-git-path setting?

Not yet. Ideally, I'd like to have Git found automatically in $PATH. I suppose that testing against the latest version isn't a bad idea just to determine if the, other issues I'm seeing are from another source, though.

return findSpecificGit(path.join(base, 'Git', 'cmd', 'git.exe'), onValidate);
This is another issue if I install git using scoop, the path to git is:
scoop\apps\git-with-openssh\current\cmd\git.exe
not under some path like git\cmd\git.exe

Inspired by git.path, change the option from win-git-path to git-path which points to the git excutation directly.

Is there consensus on git.path replacing win-git-path being the way to go?
Leave a thumbs up or a comment

Sounds like a more flexible solution 👍