huskies: merge 777

This commit is contained in:
dave
2026-04-28 00:28:57 +00:00
parent d1a2393b32
commit 70aaffc2ab
2 changed files with 90 additions and 15 deletions
+14 -15
View File
@@ -145,27 +145,26 @@ pub(crate) fn run_squash_merge(
all_output.push('\n');
if !commit.status.success() {
// Bug 226: "nothing to commit" means the feature branch has no changes
// beyond what's already on master. This must NOT be treated as success
// — it means the code was never actually merged.
if commit_stderr.contains("nothing to commit")
|| commit_stdout.contains("nothing to commit")
{
all_output.push_str(
"=== Nothing to commit — feature branch has no changes beyond master ===\n",
);
// Bug 777: "nothing to commit" after a clean squash means the feature
// branch's content is already on `base_branch` (idempotent retry after
// a previous successful merge). Return success so the caller advances
// the story to `5_done` instead of overwriting that state with
// `merge_failure`. The pre-flight `ahead == 0` check above already
// catches genuinely empty feature branches, so reaching this point
// implies "ahead > 0 but already merged".
all_output
.push_str("=== Nothing to commit — feature branch already merged into base ===\n");
cleanup_merge_workspace(project_root, &merge_wt_path, &merge_branch);
return Ok(SquashMergeResult {
success: false,
had_conflicts,
conflicts_resolved,
conflict_details: Some(
"Squash-merge resulted in an empty diff — the feature branch has no \
code changes to merge into master."
.to_string(),
),
success: true,
had_conflicts: false,
conflicts_resolved: false,
conflict_details: None,
output: all_output,
gates_passed: false,
gates_passed: true,
});
}
cleanup_merge_workspace(project_root, &merge_wt_path, &merge_branch);