mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Renamed rebaseOnto to rebase
This commit is contained in:
parent
5a76fea0a8
commit
7b936983f6
|
@ -299,8 +299,8 @@
|
|||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.rebaseOnto",
|
||||
"title": "%command.rebaseOnto%",
|
||||
"command": "git.rebase",
|
||||
"title": "%command.rebase%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
|
@ -709,7 +709,7 @@
|
|||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
|
||||
},
|
||||
{
|
||||
"command": "git.rebaseOnto",
|
||||
"command": "git.rebase",
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
|
||||
},
|
||||
{
|
||||
|
@ -1443,7 +1443,7 @@
|
|||
"command": "git.merge"
|
||||
},
|
||||
{
|
||||
"command": "git.rebaseOnto"
|
||||
"command": "git.rebase"
|
||||
},
|
||||
{
|
||||
"command": "git.branch"
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"command.deleteBranch": "Delete Branch...",
|
||||
"command.renameBranch": "Rename Branch...",
|
||||
"command.merge": "Merge Branch...",
|
||||
"command.rebaseOnto": "Rebase Branch Onto...",
|
||||
"command.rebase": "Rebase Branch...",
|
||||
"command.createTag": "Create Tag",
|
||||
"command.deleteTag": "Delete Tag",
|
||||
"command.fetch": "Fetch",
|
||||
|
|
|
@ -99,7 +99,7 @@ class MergeItem implements QuickPickItem {
|
|||
}
|
||||
}
|
||||
|
||||
class RebaseOntoItem implements QuickPickItem {
|
||||
class RebaseItem implements QuickPickItem {
|
||||
|
||||
get label(): string { return this.ref.name || ''; }
|
||||
get description(): string { return this.ref.name || ''; }
|
||||
|
@ -1862,23 +1862,23 @@ export class CommandCenter {
|
|||
await choice.run(repository);
|
||||
}
|
||||
|
||||
@command('git.rebaseOnto', { repository: true })
|
||||
async rebaseOnto(repository: Repository): Promise<void> {
|
||||
@command('git.rebase', { repository: true })
|
||||
async rebase(repository: Repository): Promise<void> {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const checkoutType = config.get<string>('checkoutType') || 'all';
|
||||
const includeRemotes = checkoutType === 'all' || checkoutType === 'remote';
|
||||
|
||||
const heads = repository.refs.filter(ref => ref.type === RefType.Head)
|
||||
.filter(ref => ref.name || ref.commit)
|
||||
.map(ref => new RebaseOntoItem(ref as Branch));
|
||||
.map(ref => new RebaseItem(ref as Branch));
|
||||
|
||||
const remoteHeads = (includeRemotes ? repository.refs.filter(ref => ref.type === RefType.RemoteHead) : [])
|
||||
.filter(ref => ref.name || ref.commit)
|
||||
.map(ref => new RebaseOntoItem(ref as Branch));
|
||||
.map(ref => new RebaseItem(ref as Branch));
|
||||
|
||||
const picks = [...heads, ...remoteHeads];
|
||||
const placeHolder = localize('select a branch to rebase onto', 'Select a branch to rebase onto');
|
||||
const choice = await window.showQuickPick<RebaseOntoItem>(picks, { placeHolder });
|
||||
const choice = await window.showQuickPick<RebaseItem>(picks, { placeHolder });
|
||||
|
||||
if (!choice) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue