mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 02:12:25 +08:00
refactor: re-write commit searching (part 3)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -814,14 +814,11 @@ namespace SourceGit.ViewModels
|
||||
Task.Run(() =>
|
||||
{
|
||||
var files = new Commands.QueryRevisionFileNames(_repo.FullPath, sha).Result();
|
||||
var filesList = new List<string>();
|
||||
filesList.AddRange(files);
|
||||
|
||||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
if (sha == Commit.SHA)
|
||||
{
|
||||
_revisionFiles = filesList;
|
||||
_revisionFiles = files;
|
||||
if (!string.IsNullOrEmpty(_revisionFileSearchFilter))
|
||||
CalcRevisionFileSearchSuggestion();
|
||||
}
|
||||
|
||||
@@ -2376,17 +2376,11 @@ namespace SourceGit.ViewModels
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var files = new Commands.QueryRevisionFileNames(_fullpath, "HEAD").Result();
|
||||
_worktreeFiles = new Commands.QueryRevisionFileNames(_fullpath, "HEAD").Result();
|
||||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
if (!IsSearchingCommitsByFilePath())
|
||||
return;
|
||||
|
||||
_worktreeFiles = new List<string>();
|
||||
foreach (var f in files)
|
||||
_worktreeFiles.Add(f);
|
||||
|
||||
CalcMatchedFilesForSearching();
|
||||
if (IsSearchingCommitsByFilePath())
|
||||
CalcMatchedFilesForSearching();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user