{"record":{"id":"91252282302b8b44","repo":"affaan-m/ECC","slug":"merge-blocked-between-left-branch-and-right-bra","errorCode":null,"errorMessage":"Merge blocked between {left_branch} and {right_branch} by {} conflict(s): {detail}","messagePattern":"Merge blocked between (.+?) and (.+?) by (.+?) conflict\\(s\\): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"ecc2/src/worktree/mod.rs","lineNumber":861,"sourceCode":"    } else {\n        Ok(WorktreeHealth::InProgress)\n    }\n}\n\npub fn has_uncommitted_changes(worktree: &WorktreeInfo) -> Result<bool> {\n    Ok(!git_status_short(&worktree.path)?.is_empty())\n}\n\npub fn has_staged_changes(worktree: &WorktreeInfo) -> Result<bool> {\n    Ok(git_status_entries(worktree)?\n        .iter()\n        .any(|entry| entry.staged))\n}\n\npub fn merge_into_base(worktree: &WorktreeInfo) -> Result<MergeOutcome> {\n    let readiness = merge_readiness(worktree)?;\n    if readiness.status == MergeReadinessStatus::Conflicted {\n        anyhow::bail!(readiness.summary);\n    }\n\n    if has_uncommitted_changes(worktree)? {\n        anyhow::bail!(\n            \"Worktree {} has uncommitted changes; commit or discard them before merging\",\n            worktree.branch\n        );\n    }\n\n    let repo_root = base_checkout_path(worktree)?;\n    let current_branch = get_current_branch(&repo_root)?;\n    if current_branch != worktree.base_branch {\n        anyhow::bail!(\n            \"Base branch {} is not checked out in repo root (currently {})\",\n            worktree.base_branch,\n            current_branch\n        );\n    }","sourceCodeStart":843,"sourceCodeEnd":879,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/ecc2/src/worktree/mod.rs#L843-L879","documentation":"merge_into_base first checks merge readiness; when the preview reports Conflicted, it aborts by raising the readiness summary listing the conflicting branches and conflict count. The merge must be resolved manually before retrying.","triggerScenarios":"Thrown at ecc2/src/worktree/mod.rs:861 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resolve the listed conflicts manually, then retry the merge.","Merge in smaller steps or rebase one branch to reduce conflict surface."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}