mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Git - Improvements to opening git repositories in parent folders (#171617)
* Initial implementation for external repositories * Added setting * Add basic welcome views * Replaced "Always Open" with "Configure" * Remove code duplication * Polish based on feedback * Language consistency * Update notification severity * Move away from the "external repository" terminology * Refactor notification logic * Saving my changes * Further improvements * Refactor parent repository notification * Update message and fix edge case when setting is set to `never`
This commit is contained in:
@@ -712,6 +712,11 @@
|
||||
"command": "git.manageUnsafeRepositories",
|
||||
"title": "%command.manageUnsafeRepositories%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.openRepositoriesInParentFolders",
|
||||
"title": "%command.openRepositoriesInParentFolders%",
|
||||
"category": "Git"
|
||||
}
|
||||
],
|
||||
"continueEditSession": [
|
||||
@@ -1162,6 +1167,10 @@
|
||||
{
|
||||
"command": "git.manageUnsafeRepositories",
|
||||
"when": "config.git.enabled && !git.missing && git.unsafeRepositoryCount != 0"
|
||||
},
|
||||
{
|
||||
"command": "git.openRepositoriesInParentFolders",
|
||||
"when": "config.git.enabled && !git.missing && git.parentRepositoryCount != 0"
|
||||
}
|
||||
],
|
||||
"scm/title": [
|
||||
@@ -2674,6 +2683,22 @@
|
||||
"experimental"
|
||||
]
|
||||
},
|
||||
"git.openRepositoryInParentFolders": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"always",
|
||||
"never",
|
||||
"prompt"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"%config.openRepositoryInParentFolders.always%",
|
||||
"%config.openRepositoryInParentFolders.never%",
|
||||
"%config.openRepositoryInParentFolders.prompt%"
|
||||
],
|
||||
"default": "prompt",
|
||||
"markdownDescription": "%config.openRepositoryInParentFolders%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"git.publishBeforeContinueOn": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
@@ -2827,14 +2852,14 @@
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.empty%",
|
||||
"when": "config.git.enabled && !git.missing && workbenchState == empty && git.unsafeRepositoryCount == 0",
|
||||
"when": "config.git.enabled && !git.missing && workbenchState == empty && git.parentRepositoryCount == 0 && git.unsafeRepositoryCount == 0",
|
||||
"enablement": "git.state == initialized",
|
||||
"group": "2_open@1"
|
||||
},
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.emptyWorkspace%",
|
||||
"when": "config.git.enabled && !git.missing && workbenchState == workspace && workspaceFolderCount == 0 && git.unsafeRepositoryCount == 0",
|
||||
"when": "config.git.enabled && !git.missing && workbenchState == workspace && workspaceFolderCount == 0 && git.parentRepositoryCount == 0 && git.unsafeRepositoryCount == 0",
|
||||
"enablement": "git.state == initialized",
|
||||
"group": "2_open@1"
|
||||
},
|
||||
@@ -2851,15 +2876,25 @@
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.folder%",
|
||||
"when": "config.git.enabled && !git.missing && git.state == initialized && workbenchState == folder && scmRepositoryCount == 0 && git.unsafeRepositoryCount == 0 && remoteName != 'codespaces'",
|
||||
"when": "config.git.enabled && !git.missing && git.state == initialized && workbenchState == folder && scmRepositoryCount == 0 && git.parentRepositoryCount == 0 && git.unsafeRepositoryCount == 0 && remoteName != 'codespaces'",
|
||||
"group": "5_scm@1"
|
||||
},
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.workspace%",
|
||||
"when": "config.git.enabled && !git.missing && git.state == initialized && workbenchState == workspace && workspaceFolderCount != 0 && scmRepositoryCount == 0 && git.unsafeRepositoryCount == 0 && remoteName != 'codespaces'",
|
||||
"when": "config.git.enabled && !git.missing && git.state == initialized && workbenchState == workspace && workspaceFolderCount != 0 && scmRepositoryCount == 0 && git.parentRepositoryCount == 0 && git.unsafeRepositoryCount == 0 && remoteName != 'codespaces'",
|
||||
"group": "5_scm@1"
|
||||
},
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.repositoryInParentFolders%",
|
||||
"when": "config.git.enabled && !git.missing && git.state == initialized && git.parentRepositoryCount == 1"
|
||||
},
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.repositoriesInParentFolders%",
|
||||
"when": "config.git.enabled && !git.missing && git.state == initialized && git.parentRepositoryCount > 1"
|
||||
},
|
||||
{
|
||||
"view": "scm",
|
||||
"contents": "%view.workbench.scm.unsafeRepository%",
|
||||
@@ -2873,15 +2908,13 @@
|
||||
{
|
||||
"view": "explorer",
|
||||
"contents": "%view.workbench.cloneRepository%",
|
||||
"when": "config.git.enabled",
|
||||
"enablement": "git.state == initialized",
|
||||
"when": "config.git.enabled && git.state == initialized && scmRepositoryCount == 0",
|
||||
"group": "5_scm@1"
|
||||
},
|
||||
{
|
||||
"view": "explorer",
|
||||
"contents": "%view.workbench.learnMore%",
|
||||
"when": "config.git.enabled",
|
||||
"enablement": "git.state == initialized",
|
||||
"when": "config.git.enabled && git.state == initialized && scmRepositoryCount == 0",
|
||||
"group": "5_scm@10"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user