mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
fix: git rev-list do not support --decorate-refs-exclude (#746)
Do not use histories filters to query commit children
This commit is contained in:
@@ -4,14 +4,12 @@ namespace SourceGit.Commands
|
||||
{
|
||||
public class QueryCommitChildren : Command
|
||||
{
|
||||
public QueryCommitChildren(string repo, string commit, int max, string filters)
|
||||
public QueryCommitChildren(string repo, string commit, int max)
|
||||
{
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
_commit = commit;
|
||||
if (string.IsNullOrEmpty(filters))
|
||||
filters = "--branches --remotes --tags";
|
||||
Args = $"rev-list -{max} --parents {filters} ^{commit}";
|
||||
Args = $"rev-list -{max} --parents --branches --remotes ^{commit}";
|
||||
}
|
||||
|
||||
public IEnumerable<string> Result()
|
||||
|
||||
@@ -576,8 +576,7 @@ namespace SourceGit.ViewModels
|
||||
Task.Run(() =>
|
||||
{
|
||||
var max = Preference.Instance.MaxHistoryCommits;
|
||||
var filter = _repo.Settings.BuildHistoriesFilter();
|
||||
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max, filter) { Cancel = _cancelToken };
|
||||
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max) { Cancel = _cancelToken };
|
||||
var children = cmdChildren.Result();
|
||||
if (!cmdChildren.Cancel.Requested)
|
||||
Dispatcher.UIThread.Post(() => Children.AddRange(children));
|
||||
|
||||
Reference in New Issue
Block a user