浏览代码

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}`;
}
}

正在加载...
取消
保存