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

Source Control fails to discover repository #150290

Closed
bradlitterell opened this issue May 24, 2022 · 3 comments
Closed

Source Control fails to discover repository #150290

bradlitterell opened this issue May 24, 2022 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality git GIT issues
Milestone

Comments

@bradlitterell
Copy link

  1. clone a git repository in an administrating command prompt.
  2. Open VSCode
  3. Open Folder selecting the repository cloned in step 1

Actual result:
Source Control panel displays "The folder currently open doesn't have a git repository".

The actual result is incorrect and misleading.

Git output panel contents:
[2022-05-24T16:12:29.235Z] Validating found git in: C:\Program Files\Git\cmd\git.exe
[2022-05-24T16:12:29.393Z] Using git 2.36.0.vfs.0.0 from C:\Program Files\Git\cmd\git.exe
[2022-05-24T16:12:30.944Z] > git rev-parse --show-toplevel [493ms]
[2022-05-24T16:12:30.944Z] fatal: unsafe repository ('C:/dev/xx/ms-tpm-20-ref' is owned by someone else)
To add an exception for this directory, call:

git config --global --add safe.directory C:/dev/xx/ms-tpm-20-ref

Expected result (option 1):
VS Code displays message that git encountered an error

Expected result (option 2):
VS Code recognizes the unsafe repository and provides instructions for user to rectify the problem.

@lszomoru lszomoru added feature-request Request for new features or functionality git GIT issues labels May 25, 2022
@lszomoru lszomoru added this to the Backlog milestone May 25, 2022
@msftrncs
Copy link

msftrncs commented Jun 4, 2022

Duplicate of #148132, #148914, and probably #147797.

@BrainSlugs83
Copy link

BrainSlugs83 commented Aug 23, 2022

Expected result (option 1): VS Code displays message that git encountered an error

Expected result (option 2): VS Code recognizes the unsafe repository and provides instructions for user to rectify the problem.

Honestly... why not do both? -- and give an dialog option that a user can select to do it automatically.

(A user still has to consciously choose the option, so it's not happening without their consent -- but since this is a GUI tool for managing version controlled files, there should be a way to do it from within the GUI.)

Edit: Also, I disagree that #157933 is a duplicate, as it has elevation specific nuances (i.e. the repo is already trusted in that bug; but vscode still fails to report that it exists.)

@lszomoru
Copy link
Member

lszomoru commented Dec 6, 2022

Closing as duplicate of #157159. This will be included in VS Code 1.74.

@lszomoru lszomoru closed this as completed Dec 6, 2022
@lszomoru lszomoru added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality git GIT issues
Projects
None yet
Development

No branches or pull requests

4 participants