From 9fed706fd256b48c04f83e36fb6d438bede981c5 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 9 Apr 2017 01:19:14 -0400 Subject: [PATCH] Adds commit search command to branch history --- src/quickPicks/branchHistory.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/quickPicks/branchHistory.ts b/src/quickPicks/branchHistory.ts index 55edb3a..b16fc4d 100644 --- a/src/quickPicks/branchHistory.ts +++ b/src/quickPicks/branchHistory.ts @@ -25,6 +25,11 @@ export class BranchHistoryQuickPick { description: `\u00a0 \u2014 \u00a0\u00a0 to \u00a0$(git-branch) ${branch} history` }, Commands.ShowQuickBranchHistory, [uri, branch, log.maxCount, goBackCommand, log]); + items.splice(0, 0, new CommandQuickPickItem({ + label: `$(search) Show Commit Search`, + description: `\u00a0 \u2014 \u00a0\u00a0 search for commits by message, author, files, or sha` + }, Commands.ShowCommitSearch, [new GitUri(Uri.file(log.repoPath), { fileName: '', repoPath: log.repoPath }), undefined, undefined, currentCommand])); + const remotes = Arrays.uniqueBy(await git.getRemotes((uri && uri.repoPath) || git.repoPath), _ => _.url, _ => !!_.provider); if (remotes.length) { items.splice(0, 0, new OpenRemotesCommandQuickPickItem(remotes, 'branch', branch, currentCommand));