提交 7b936983 编写于 作者: T tomerstav

Renamed rebaseOnto to rebase

上级 5a76fea0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册