浏览代码

Allows search to include details

main
Eric Amodio 5 年前
父节点
当前提交
22598e83c6
共有 4 个文件被更改,包括 28 次插入23 次删除
  1. +1
    -0
      src/commands/git/cherry-pick.ts
  2. +1
    -0
      src/commands/git/merge.ts
  3. +1
    -0
      src/commands/git/rebase.ts
  4. +25
    -23
      src/commands/git/stash.ts

+ 1
- 0
src/commands/git/cherry-pick.ts 查看文件

@ -136,6 +136,7 @@ export class CherryPickGitCommand extends QuickCommandBase {
log === undefined
? `${state.source.name} has no pickable commits`
: `Choose commits to cherry-pick onto ${state.destination.name}`,
matchOnDescription: true,
items:
log === undefined
? [

+ 1
- 0
src/commands/git/merge.ts 查看文件

@ -82,6 +82,7 @@ export class MergeGitCommand extends QuickCommandBase {
state.repo.formattedName
}`,
placeholder: `Choose a branch or tag to merge into ${state.destination.name}`,
matchOnDescription: true,
items: await getBranchesAndOrTags(state.repo, true, {
filterBranches: b => b.id !== destId,
picked: state.source && state.source.ref

+ 1
- 0
src/commands/git/rebase.ts 查看文件

@ -82,6 +82,7 @@ export class RebaseGitCommand extends QuickCommandBase {
state.repo.formattedName
}`,
placeholder: `Choose a branch or tag to rebase ${state.destination.name} with`,
matchOnDescription: true,
items: await getBranchesAndOrTags(state.repo, true, {
filterBranches: b => b.id !== destId,
picked: state.source && state.source.ref

+ 25
- 23
src/commands/git/stash.ts 查看文件

@ -270,6 +270,7 @@ export class StashGitCommand extends QuickCommandBase {
stash === undefined
? `${state.repo.formattedName} has no stashed changes`
: 'Choose a stash to apply to your working tree',
matchOnDetail: true,
items:
stash === undefined
? [
@ -372,6 +373,7 @@ export class StashGitCommand extends QuickCommandBase {
stash === undefined
? `${state.repo.formattedName} has no stashed changes`
: 'Choose a stash to delete',
matchOnDetail: true,
items:
stash === undefined
? [
@ -388,7 +390,7 @@ export class StashGitCommand extends QuickCommandBase {
}
)
)
]
]
});
const selection = yield step;
@ -400,29 +402,29 @@ export class StashGitCommand extends QuickCommandBase {
}
// if (this.confirm(state.confirm)) {
const message =
state.stash.message.length > 80
? `${state.stash.message.substring(0, 80)}${GlyphChars.Ellipsis}`
: state.stash.message;
const step = this.createConfirmStep<QuickPickItem>(
`Confirm ${this.title} ${state.subcommand}${Strings.pad(GlyphChars.Dot, 2, 2)}${
state.repo.formattedName
}`,
[
{
label: `${this.title} ${state.subcommand}`,
description: `${state.stash.stashName}${Strings.pad(GlyphChars.Dash, 2, 2)}${message}`,
detail: `Will delete ${state.stash.stashName}`
}
],
{ placeholder: `Confirm ${this.title} ${state.subcommand}` }
);
const selection = yield step;
const message =
state.stash.message.length > 80
? `${state.stash.message.substring(0, 80)}${GlyphChars.Ellipsis}`
: state.stash.message;
const step = this.createConfirmStep<QuickPickItem>(
`Confirm ${this.title} ${state.subcommand}${Strings.pad(GlyphChars.Dot, 2, 2)}${
state.repo.formattedName
}`,
[
{
label: `${this.title} ${state.subcommand}`,
description: `${state.stash.stashName}${Strings.pad(GlyphChars.Dash, 2, 2)}${message}`,
detail: `Will delete ${state.stash.stashName}`
}
],
{ placeholder: `Confirm ${this.title} ${state.subcommand}` }
);
const selection = yield step;
if (!this.canMoveNext(step, state, selection)) {
break;
}
if (!this.canMoveNext(step, state, selection)) {
break;
}
// }
void Container.git.stashDelete(state.repo.path, state.stash.stashName);

正在加载...
取消
保存