feat(worker): use the list base branch as worktree base and default merge target

This commit is contained in:
mika kuns
2026-10-01 10:46:21 +02:00
parent 3fe1feadf9
commit 69c7803bdf
5 changed files with 120 additions and 14 deletions
+1 -3
View File
@@ -865,9 +865,7 @@ public sealed class MergeMcpTools
throw new InvalidOperationException(
"Merge preview unavailable for this task (worktree inactive or repo is not a git repository).");
var target = string.IsNullOrWhiteSpace(targetBranch)
? await _git.GetCurrentBranchAsync(list.WorkingDir, ct)
: targetBranch;
var target = await _merge.ResolveTargetAsync(list, targetBranch, ct);
var behind = await WorktreeMcpTools.GitRevListCountAsync(list.WorkingDir, $"{wt.BranchName}..{target}", ct);
var changedFiles = Directory.Exists(wt.Path)