mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
feature: use repository filters to limit children search
This commit is contained in:
parent
c611b62992
commit
3fb1c763f3
2 changed files with 5 additions and 3 deletions
|
@ -5,12 +5,14 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public class QueryCommitChildren : Command
|
||||
{
|
||||
public QueryCommitChildren(string repo, string commit)
|
||||
public QueryCommitChildren(string repo, string commit, string filters)
|
||||
{
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
_commit = commit;
|
||||
Args = $"rev-list --parents --all ^{commit}";
|
||||
if (string.IsNullOrEmpty(filters))
|
||||
filters = "--all";
|
||||
Args = $"rev-list --parents {filters} ^{commit}";
|
||||
}
|
||||
|
||||
public IEnumerable<string> Result()
|
||||
|
|
|
@ -540,7 +540,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var children = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA).Result();
|
||||
var children = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, _repo.Settings.BuildHistoriesFilter()).Result();
|
||||
Dispatcher.UIThread.Invoke(() => Children.AddRange(children));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue