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
b5f0bbcf61
commit
e34dfb13d3
2 changed files with 5 additions and 3 deletions
|
@ -5,12 +5,14 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
public class QueryCommitChildren : Command
|
public class QueryCommitChildren : Command
|
||||||
{
|
{
|
||||||
public QueryCommitChildren(string repo, string commit)
|
public QueryCommitChildren(string repo, string commit, string filters)
|
||||||
{
|
{
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
_commit = commit;
|
_commit = commit;
|
||||||
Args = $"rev-list --parents --all ^{commit}";
|
if (string.IsNullOrEmpty(filters))
|
||||||
|
filters = "--all";
|
||||||
|
Args = $"rev-list --parents {filters} ^{commit}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<string> Result()
|
public IEnumerable<string> Result()
|
||||||
|
|
|
@ -540,7 +540,7 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
Task.Run(() =>
|
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));
|
Dispatcher.UIThread.Invoke(() => Children.AddRange(children));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue