enhance: use --ancestry-path=<commit_oid> to reduce unnecessary outpus while querying children commits

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-12 10:11:00 +08:00
parent f5d6e1264d
commit 231f3bf668
No known key found for this signature in database

View file

@ -9,7 +9,7 @@ namespace SourceGit.Commands
WorkingDirectory = repo;
Context = repo;
_commit = commit;
Args = $"rev-list -{max} --parents --branches --remotes ^{commit}";
Args = $"rev-list -{max} --parents --branches --remotes --ancestry-path={commit} ^{commit}";
}
public List<string> Result()