Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress message "GitLens was unable to find Git" #1368

Closed
thernstig opened this issue Feb 5, 2021 · 8 comments
Closed

Suppress message "GitLens was unable to find Git" #1368

thernstig opened this issue Feb 5, 2021 · 8 comments
Assignees
Labels
bug Something isn't working needs-verification Request for community verification
Milestone

Comments

@thernstig
Copy link

I run VS Code in Windows but develop exclusively with the remote extensions (WSL, ssh, containers). This means I never install git in Windows. Yet, I always get this error when launching VS Code

GitLens was unable to find Git. Please make sure Git is installed. Also ensure that Git is either in the PATH, or that 'git.path' is pointed to its installed location.

It would be nice if this could be added as a config:

  "gitlens.advanced.messages": {
    "suppressGitNotInstalled": true
  },

That way I can suppress that message from showing up at every start.

@thernstig thernstig added feature New feature or request triage Needs to be looked at labels Feb 5, 2021
@eamodio
Copy link
Member

eamodio commented Feb 9, 2021

GitLens can't work without Git installed. So for your scenario, I would recommend disabling GitLens locally, an only leave it on in the remote.

@eamodio eamodio added needs-more-info Needs further information, steps, details, etc. and removed triage Needs to be looked at labels Feb 9, 2021
@thernstig
Copy link
Author

Afaik that is not possible. I just tested it .

Note that I open VS Code in Windows (without being connected to a remote). The only option I then have is to disable globally. This is then synced to all my machines, meaning Gitlens is even disabled locally/remotely for all my machines.

@eamodio
Copy link
Member

eamodio commented Feb 9, 2021

@sandy081 is that expected? I wouldn't have expected the local enabled state to be synchronized to a remote.

@thernstig
Copy link
Author

By the way, I have a about 20 extensions and many of them require something else to be installed to function. E.g. the docker extension requires docker, but it still does not give me an error when I launch VS Code. Every other extension handles this gracefully only giving me warning/errors/notifications or uses GUI in ways to inform me that it does not work, when actually invoking it.

@eamodio eamodio closed this as completed in e27da91 Feb 9, 2021
@eamodio eamodio added bug Something isn't working needs-verification Request for community verification pending-release Resolved but not yet released to the stable edition and removed feature New feature or request needs-more-info Needs further information, steps, details, etc. labels Feb 9, 2021
@eamodio eamodio self-assigned this Feb 9, 2021
@eamodio eamodio added this to the Soon™ milestone Feb 9, 2021
@eamodio
Copy link
Member

eamodio commented Feb 9, 2021

Can you please verify this fix in tomorrow's insiders edition?

You can install the insiders edition from here. Be sure to disable/uninstall the stable version of GitLens first.

@sandy081
Copy link

We do not sync local to remote.

This is then synced to all my machines, meaning Gitlens is even disabled locally/remotely for all my machines.

I think user is mentioning about other machines when said remote

@thernstig
Copy link
Author

@sandy081 correct, I meant to other machines (i.e. other laptops I have). But on those other laptops, it then also disables it both locally and on ssh remotes after the sync.

But it's moot now as it seems @eamodio has fixed it :)

@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Mar 5, 2021
@eamodio eamodio modified the milestones: Soon™, Shipped Mar 5, 2021
@github-actions
Copy link

github-actions bot commented Apr 5, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs-verification Request for community verification
Projects
None yet
Development

No branches or pull requests

3 participants