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

Git - Options for discovering Git repositories outside the workspace #169256

Closed
lszomoru opened this issue Dec 15, 2022 · 2 comments
Closed

Git - Options for discovering Git repositories outside the workspace #169256

lszomoru opened this issue Dec 15, 2022 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues on-release-notes Issue/pull request mentioned in release notes on-testplan
Milestone

Comments

@lszomoru
Copy link
Member

The default value of the git.autoRepositoryDetection setting is true so Git repositories are discovered based on the workspace folders, and parent folders of the opened files. There are scenarios in which the Git repository root is outside the workspace folder. This is a valuable feature as it allows users to open a subfolder of a Git repository yet have the ability to perform source control operations.

Unfortunately this behaviour also has some negative side-effects. The most extreme scenario is when one opens a loose file from the home folder, and there is a Git repository in the home directory. This can cause confusion as there are lots of changes in the "Source Control" view and discarding those changes results in data loss.

//cc @digitarald

@lszomoru lszomoru added feature-request Request for new features or functionality git GIT issues labels Dec 15, 2022
@lszomoru lszomoru added this to the January 2023 milestone Dec 15, 2022
@lszomoru lszomoru self-assigned this Dec 15, 2022
@digitarald
Copy link
Contributor

Given the unexpected side effects but as some people might depend on it for quick edits, maybe this should be opt-in? Disabling the SCM view but showing an option to enable it (linking to the setting)?

@lszomoru
Copy link
Member Author

Related - #171617

@lszomoru lszomoru added the on-release-notes Issue/pull request mentioned in release notes label Jan 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues on-release-notes Issue/pull request mentioned in release notes on-testplan
Projects
None yet
Development

No branches or pull requests

3 participants