You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this extension, it is fantastically useful! I would like to share a small suggestion.
Currently, if there is an error in a user's gitconfig file and a new VSCode window with GitLens is opened, GitLens will generate a the following popup saying that git cannot be found:
However, this is not the real problem. The problem is a bad gitconfig. This can be confirmed by trying to run any git operation in a console - git will print something like:
fatal: bad config line 5 in file C:/Users/andrewha/.gitconfig
Instead of saying git cannot be found, the GitLens popup should communicate that there is a problem with the gitconfig. This should be doable by checking the output from a git command for a string like the above.
Alternatively, at least communicate that "git threw an error" rather than "git is not found" since that is not the case.
The text was updated successfully, but these errors were encountered:
Hi @eamodio, thank you for addressing this so quickly! I tested your fix on the insiders edition briefly and found the following:
With git removed from my user and system PATHs, git.path setting removed, error-free git config - I seem to get no error at all; no "GitLens was unable to find Git" (unexpected behaviour)
With git removed from my user and system PATHs, git.path setting removed, error introduced to git config - I get the "GitLens was unable to find Git" message (expected behaviour, but why not in the previous case?)
With git not in my PATH but with the git.path setting set appropriately, plus an error in the git config - I get the "GitLens was unable to find Git" message (unexpected behaviour)
With git in my PATH, with or without the git.path setting set appropriately, plus an error in the git config - I get the new "GitLens is unable to use Git. Your Git configuration seems to be invalid." (expected behaviour)
So unfortunately I'm not seeing consistent reporting of either git's presence or git config errors.
Running on Windows
VS Code version 1.56.2
GitLens Insiders 2021.5.2405
Git Version 2.31.1.windows.1