feature: test if conflicts have been resolved manually (#96)

This commit is contained in:
leo 2024-04-29 10:54:29 +08:00
parent df66bacbd2
commit 84568e573a
5 changed files with 74 additions and 27 deletions

View file

@ -0,0 +1,20 @@
namespace SourceGit.Commands
{
public class IsConflictResolved : Command
{
public IsConflictResolved(string repo, Models.Change change)
{
var opt = new Models.DiffOption(change, true);
WorkingDirectory = repo;
Context = repo;
Args = $"diff -a --ignore-cr-at-eol --check {opt}";
}
public bool Result()
{
var rs = ReadToEnd();
return rs.IsSuccess;
}
}
}