feat(git): add MergeNoFfAsync returning (exitCode, stderr)

This commit is contained in:
Mika Kuns
2026-04-22 09:27:47 +02:00
parent 535d0c5558
commit 3ebbdb3f6e
2 changed files with 65 additions and 0 deletions

View File

@@ -183,6 +183,14 @@ public sealed class GitService
return File.Exists(Path.Combine(gitDir, "MERGE_HEAD"));
}
public async Task<(int ExitCode, string Stderr)> MergeNoFfAsync(
string repoDir, string sourceBranch, string message, CancellationToken ct = default)
{
var (exitCode, _, stderr) = await RunGitAsync(repoDir,
["merge", "--no-ff", "-m", message, sourceBranch], ct);
return (exitCode, stderr);
}
public async Task MergeFfOnlyAsync(string repoDir, string branchName, CancellationToken ct = default)
{
var (exitCode, _, stderr) = await RunGitAsync(repoDir, ["merge", "--ff-only", branchName], ct);