mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 15:35:20 +01:00
move git rename to command palette
This commit is contained in:
@@ -628,7 +628,7 @@
|
||||
},
|
||||
{
|
||||
"command": "git.rename",
|
||||
"when": "false"
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme == file"
|
||||
},
|
||||
{
|
||||
"command": "git.commit",
|
||||
@@ -1352,18 +1352,6 @@
|
||||
"when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/"
|
||||
}
|
||||
],
|
||||
"explorer/context": [
|
||||
{
|
||||
"submenu": "git.explorer",
|
||||
"group": "7_git",
|
||||
"when": "config.git.enabled && !git.missing && !explorerResourceIsRoot"
|
||||
}
|
||||
],
|
||||
"git.explorer": [
|
||||
{
|
||||
"command": "git.rename"
|
||||
}
|
||||
],
|
||||
"git.commit": [
|
||||
{
|
||||
"command": "git.commit",
|
||||
@@ -1582,10 +1570,6 @@
|
||||
]
|
||||
},
|
||||
"submenus": [
|
||||
{
|
||||
"id": "git.explorer",
|
||||
"label": "%submenu.explorer%"
|
||||
},
|
||||
{
|
||||
"id": "git.commit",
|
||||
"label": "%submenu.commit%"
|
||||
|
||||
@@ -766,7 +766,9 @@ export class CommandCenter {
|
||||
}
|
||||
|
||||
@command('git.rename', { repository: true })
|
||||
async rename(repository: Repository, fromUri: Uri): Promise<void> {
|
||||
async rename(repository: Repository, fromUri: Uri | undefined): Promise<void> {
|
||||
fromUri = fromUri ?? window.activeTextEditor?.document.uri;
|
||||
|
||||
if (!fromUri) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user