feat(git): add MergeAbortAsync

This commit is contained in:
Mika Kuns
2026-04-22 09:29:24 +02:00
parent 3ebbdb3f6e
commit 21a1870fd7
2 changed files with 32 additions and 0 deletions

View File

@@ -191,6 +191,13 @@ public sealed class GitService
return (exitCode, stderr);
}
public async Task MergeAbortAsync(string repoDir, CancellationToken ct = default)
{
var (exitCode, _, stderr) = await RunGitAsync(repoDir, ["merge", "--abort"], ct);
if (exitCode != 0)
throw new InvalidOperationException($"git merge --abort failed (exit {exitCode}): {stderr}");
}
public async Task MergeFfOnlyAsync(string repoDir, string branchName, CancellationToken ct = default)
{
var (exitCode, _, stderr) = await RunGitAsync(repoDir, ["merge", "--ff-only", branchName], ct);