mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: check commit hash after intersect testing
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
71d0b69eee
commit
5e898a809e
1 changed files with 6 additions and 6 deletions
|
@ -665,11 +665,6 @@ namespace SourceGit.ViewModels
|
|||
if (!sha.Success)
|
||||
continue;
|
||||
|
||||
var hash = sha.Groups[1].Value;
|
||||
var test = new Commands.IsCommitSHA(_repo.FullPath, hash).Result();
|
||||
if (!test)
|
||||
continue;
|
||||
|
||||
var start = sha.Index;
|
||||
var len = sha.Length;
|
||||
var intersect = false;
|
||||
|
@ -682,7 +677,12 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
if (!intersect)
|
||||
if (intersect)
|
||||
continue;
|
||||
|
||||
var hash = sha.Groups[1].Value;
|
||||
var isCommitSHA = new Commands.IsCommitSHA(_repo.FullPath, hash).Result();
|
||||
if (isCommitSHA)
|
||||
links.Add(new Models.Hyperlink(start, len, hash, true));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue