fix(worker): block approve of a planning parent with an unfinished child, surface git stderr on ff failure
This commit is contained in:
@@ -88,8 +88,9 @@ public sealed class UnitBranchService
|
||||
var (code, stderr) = await _git.MergeFastForwardOnlyAsync(parentWt.Path, childWt.BranchName, ct);
|
||||
if (code != 0)
|
||||
return new AbsorbResult(true,
|
||||
$"Unit branch '{parentWt.BranchName}' cannot be fast-forwarded to '{childWt.BranchName}' — the child " +
|
||||
$"did not start from the unit's current head (e.g. it was run in parallel via Run now). git: {stderr}");
|
||||
$"Unit branch '{parentWt.BranchName}' cannot be fast-forwarded to '{childWt.BranchName}': {stderr.Trim()} " +
|
||||
"(usually the child did not start from the unit's current head, e.g. run in parallel via Run now, " +
|
||||
"or the unit worktree has local changes)");
|
||||
|
||||
var head = await _git.RevParseHeadAsync(parentWt.Path, ct);
|
||||
var diffStat = await _git.DiffStatAsync(parentWt.Path, parentWt.BaseCommit, head, ct: ct);
|
||||
|
||||
Reference in New Issue
Block a user