mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
feature: test if conflicts have been resolved manually (#96)
This commit is contained in:
parent
df66bacbd2
commit
84568e573a
5 changed files with 74 additions and 27 deletions
20
src/Commands/IsConflictResolved.cs
Normal file
20
src/Commands/IsConflictResolved.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue