mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Other
1.9k stars 244 forks source link

Something wrong Git version detection #734

Open chrskjoe opened 1 year ago

chrskjoe commented 1 year ago

Describe the Bug A clear and concise description of what the bug is.

I was developing on a CentOS 7 whose git version is 1.8.. Then I built a git with version 2. from source. which told me that I was running a new git, but the git graph still thinking I am using an old git.

Steps to Reproduce Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Expected Behaviour A clear and concise description of what you expected to happen.

Environment

Screenshots (optional) Add any screenshots showing the bug.

Additional Context (optional) Add any other context about the problem here.

⚠ Please make sure you complete all of the required sections of this template. Without this required information, it will be harder to replicate this bug, and cause additional delays in resolving it.

erkobridee commented 3 months ago

Hi, I got a similar issue running the extension from inside of the VS Code DevContainer (Java 1-8-bullseye)

host os: Mac OS 14.2.1

From inside of the dev container:

Git Graph: 1.30.0 Visual Studio Code: 1.87.2 OS: Linux arm64 6.6.16-linuxkit Git: 2.30.2

debugging, I found out that inside the container, I have 2 versions of git

$ /usr/local/bin/git --version
git version 2.41.0
$ /usr/bin/git --version
git version 2.30.2

the weird part is the VS Code is using the one from /usr/local/bin/git

Screenshot 2024-03-29 at 8 39 06 PM

and once I trigger the git commands to for example pull the changes from the remote repository or commit something from inside of the VS Code I don't get any issue

I also tried to force set the "git.path": "/usr/local/bin/git" but it was ignored by the git-graph extension 🤔

for now, I'll disable this extension on the VS Code DevContainer 😢