From 5af5af0d05f3001796c2ffaa945058755af2c481 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 11 Nov 2019 00:10:08 -0500 Subject: [PATCH] Adds auto search by commit if pattern is a sha --- src/git/gitService.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/git/gitService.ts b/src/git/gitService.ts index ac1eb88..b891004 100644 --- a/src/git/gitService.ts +++ b/src/git/gitService.ts @@ -3051,7 +3051,19 @@ export class GitService implements Disposable { let match = searchMessageOperationRegex.exec(search); if (match != null && match[1] !== '') { - this.parseSearchMessageOperations(match[1], operations); + [, value] = match; + + if (GitService.isSha(value)) { + let values = operations.get('commit:'); + if (values === undefined) { + values = [value]; + operations.set('commit:', values); + } else { + values.push(value); + } + } else { + this.parseSearchMessageOperations(value, operations); + } } do {