feature: respect global commit limit for a good measure

This commit is contained in:
Dmitrij D. Czarkoff 2024-11-17 02:04:22 +01:00
parent f96f602456
commit 88fb754415
No known key found for this signature in database

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using SourceGit.ViewModels;
namespace SourceGit.Commands namespace SourceGit.Commands
{ {
@ -12,7 +13,7 @@ namespace SourceGit.Commands
_commit = commit; _commit = commit;
if (string.IsNullOrEmpty(filters)) if (string.IsNullOrEmpty(filters))
filters = "--all"; filters = "--all";
Args = $"rev-list --parents {filters} ^{commit}"; Args = $"rev-list -{Preference.Instance.MaxHistoryCommits} --parents {filters} ^{commit}";
} }
protected override void OnReadline(string line) protected override void OnReadline(string line)