feat: support compare both revision in FileHistories (#786) (#946)

This commit is contained in:
GadflyFang 2025-02-06 11:33:55 +08:00 committed by GitHub
parent 65a9406c9a
commit 9aba737d9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 206 additions and 20 deletions

View file

@ -18,6 +18,15 @@ namespace SourceGit.Commands
Args = $"diff --name-status {based} {end}";
}
public CompareRevisions(string repo, string start, string end, string path)
{
WorkingDirectory = repo;
Context = repo;
var based = string.IsNullOrEmpty(start) ? "-R" : start;
Args = $"diff --name-status {based} {end} -- {path}";
}
public List<Models.Change> Result()
{
Exec();