Browse Source

Avoids uncommitted sha in commit search

main
Eric Amodio 7 years ago
parent
commit
d08c442436
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/commands/showCommitSearch.ts

+ 1
- 1
src/commands/showCommitSearch.ts View File

@ -43,7 +43,7 @@ export class ShowCommitSearchCommand extends ActiveEditorCachedCommand {
if (!args.search) {
if (editor !== undefined && gitUri !== undefined) {
const blameLine = await this.git.getBlameForLine(gitUri, editor.selection.active.line);
if (blameLine !== undefined) {
if (blameLine !== undefined && !blameLine.commit.isUncommitted) {
args.search = `#${blameLine.commit.shortSha}`;
}
}

Loading…
Cancel
Save