瀏覽代碼

Avoids uncommitted sha in commit search

main
Eric Amodio 7 年之前
父節點
當前提交
d08c442436
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/commands/showCommitSearch.ts

+ 1
- 1
src/commands/showCommitSearch.ts 查看文件

@ -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…
取消
儲存