Skip to content

Commit d08c442

Browse files
committed
Avoids uncommitted sha in commit search
1 parent cb133d8 commit d08c442

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/showCommitSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class ShowCommitSearchCommand extends ActiveEditorCachedCommand {
4343
if (!args.search) {
4444
if (editor !== undefined && gitUri !== undefined) {
4545
const blameLine = await this.git.getBlameForLine(gitUri, editor.selection.active.line);
46-
if (blameLine !== undefined) {
46+
if (blameLine !== undefined && !blameLine.commit.isUncommitted) {
4747
args.search = `#${blameLine.commit.shortSha}`;
4848
}
4949
}

0 commit comments

Comments
 (0)