mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 05:40:43 +08:00
- Remove all synchronous method in commands - `Command.ReadToEndAsync` now is protected method - Rename `ResultAsync` to `GetResultAsync` - Call `ConfigureAwait(false)` when there's no context Signed-off-by: leo <longshuang@msn.cn>
23 lines
573 B
C#
23 lines
573 B
C#
using System.Threading.Tasks;
|
|
|
|
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 async Task<bool> GetResultAsync()
|
|
{
|
|
var rs = await ReadToEndAsync().ConfigureAwait(false);
|
|
return rs.IsSuccess;
|
|
}
|
|
}
|
|
}
|