mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
refactor: re-write commit searching (part 3)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
ee7ccc0391
commit
bb2284c4c9
3 changed files with 15 additions and 18 deletions
|
@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue