microsoft / microsoft/winget-cli

Package Microsoft.Git Id incorrectly shown as Git.Git with `winget list` command

Open
#4,917 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-External Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I want to update my git for vfs to the latest version using winget, so I started to use winget list --name git. But the returned id for git for vfs was Git.Git (which is supposed to be the git for windows, other than git for vfs):
Image

Upating git with command winget update --id Git.Git fails as expected with this error message "The VFS for Git-aware flavor of Git for Windows is currently installed. Switching away from that flavor might break your Scalar/VFS for Git enlistments."

The correct command is winget update --id Microsoft.git. But because the returned Id from winget list shows that as Git.Git, it was causing confusion and users not able to update git for VFS with the correct winget command.

Steps to reproduce
  1. In my local machine, run gvfs --version to confirm that I have GVFS installed:

gvfs --version
GVFS 1.0.24074.1

  1. Run git -v to confirm that I have git for VFS installed:

git -v
git version 2.46.0.vfs.0.0

  1. Run winget list --name git to retrieve all the git related packages, from where I see that Microsoft.Git was using the Git.Git id

winget list --name git Name Id Version Available Source


Git Git.Git 2.46.0.0.0 2.47.0 winget
GitService 2.0.21069.2 ARP\Machine\X64{0CBA8A6D-A696-4277-AF07-9379F4552C16}_is1 2.0.21069.2
VFS for Git version 1.0.24074.1 ARP\Machine\X64{489CA581-F131-4C28-BE04-4FB178933E6D}_is1 1.0.24074.1

  1. To update my git, if I run winget update --id Git.Git, it failed with error "The VFS for Git-aware flavor of Git for Windows is currently installed. Switching away from that flavor might break your Scalar/VFS for Git enlistments." as exepcted
    Image
Expected behavior

winget list --name git command should return Microsoft.Git for the installed git for vfs.

Actual behavior

winget list --name git command is currently returning Git.Git for the installed git for vfs.

Environment

Windows Package Manager v1.9.25180
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.4317
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25180.0

git version 2.46.0.vfs.0.0
GVFS 1.0.24074.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the package identity mismatch with gvfs --version, git -v, and winget list --name git on the stated Windows Package Manager environment. Trace how the installed VFS for Git package is identified, then verify that winget list reports Microsoft.Git and that the resulting ID can be used with winget update.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.