Skip to content

Commit 5e898a8

Browse files
committed
enhance: check commit hash after intersect testing
Signed-off-by: leo <[email protected]>
1 parent 71d0b69 commit 5e898a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ViewModels/CommitDetail.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,6 @@ private void Refresh()
665665
if (!sha.Success)
666666
continue;
667667

668-
var hash = sha.Groups[1].Value;
669-
var test = new Commands.IsCommitSHA(_repo.FullPath, hash).Result();
670-
if (!test)
671-
continue;
672-
673668
var start = sha.Index;
674669
var len = sha.Length;
675670
var intersect = false;
@@ -682,7 +677,12 @@ private void Refresh()
682677
}
683678
}
684679

685-
if (!intersect)
680+
if (intersect)
681+
continue;
682+
683+
var hash = sha.Groups[1].Value;
684+
var isCommitSHA = new Commands.IsCommitSHA(_repo.FullPath, hash).Result();
685+
if (isCommitSHA)
686686
links.Add(new Models.Hyperlink(start, len, hash, true));
687687
}
688688

0 commit comments

Comments
 (0)