mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -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:
parent
d38d1b11e8
commit
1c0d8a2697
2 changed files with 3 additions and 6 deletions
|
@ -4,14 +4,12 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
public class QueryCommitChildren : Command
|
public class QueryCommitChildren : Command
|
||||||
{
|
{
|
||||||
public QueryCommitChildren(string repo, string commit, int max, string filters)
|
public QueryCommitChildren(string repo, string commit, int max)
|
||||||
{
|
{
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
_commit = commit;
|
_commit = commit;
|
||||||
if (string.IsNullOrEmpty(filters))
|
Args = $"rev-list -{max} --parents --branches --remotes ^{commit}";
|
||||||
filters = "--branches --remotes --tags";
|
|
||||||
Args = $"rev-list -{max} --parents {filters} ^{commit}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<string> Result()
|
public IEnumerable<string> Result()
|
||||||
|
|
|
@ -576,8 +576,7 @@ namespace SourceGit.ViewModels
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
var max = Preference.Instance.MaxHistoryCommits;
|
var max = Preference.Instance.MaxHistoryCommits;
|
||||||
var filter = _repo.Settings.BuildHistoriesFilter();
|
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max) { Cancel = _cancelToken };
|
||||||
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max, filter) { Cancel = _cancelToken };
|
|
||||||
var children = cmdChildren.Result();
|
var children = cmdChildren.Result();
|
||||||
if (!cmdChildren.Cancel.Requested)
|
if (!cmdChildren.Cancel.Requested)
|
||||||
Dispatcher.UIThread.Post(() => Children.AddRange(children));
|
Dispatcher.UIThread.Post(() => Children.AddRange(children));
|
||||||
|
|
Loading…
Reference in a new issue