{"record":{"id":"c6cdd6fad98d4893","repo":"gitbutlerapp/gitbutler","slug":"refusing-to-land-branch-commit-s-on-unnam","errorCode":null,"errorMessage":"Refusing to land `{branch}`: {} commit(s) on unnamed segment(s) below it would also be published to {target_display}. Pass --whole-stack to land `{branch}` together with everything below it.","messagePattern":"Refusing to land `(.+?)`: (.+?) commit\\(s\\) on unnamed segment\\(s\\) below it would also be published to (.+?)\\. Pass --whole-stack to land `(.+?)` together with everything below it\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-api/src/land/mod.rs","lineNumber":427,"sourceCode":"        // deleted still holds commits that \"land the entire stack\" would have to include.\n        if let Some(top) = scan.upper_segments.first() {\n            bail!(\n                \"Refusing to land `{branch}` with --whole-stack: it is not the top of its stack. \\\n                 --whole-stack lands the entire stack; name its top segment `{top}` instead.\",\n            );\n        }\n        bail!(\n            \"Refusing to land `{branch}` with --whole-stack: it is not the top of its stack — \\\n             unnamed segment(s) with commits sit above it (their branch refs no longer exist), so \\\n             landing `{branch}` would not land the entire stack.\",\n        );\n    }\n    // Key off the commits below, not the segment names: segments whose branch ref was deleted are\n    // unnamed but their commits would be published all the same.\n    let publishes_below = scan.commits_below > 0 || !scan.lower_segments.is_empty();\n    if publishes_below && !whole_stack {\n        if scan.lower_segments.is_empty() {\n            bail!(\n                \"Refusing to land `{branch}`: {} commit(s) on unnamed segment(s) below it would \\\n                 also be published to {target_display}. Pass --whole-stack to land `{branch}` \\\n                 together with everything below it.\",\n                scan.commits_below,\n            );\n        }\n        bail!(\n            \"Refusing to land `{branch}`: it is stacked on top of {} other segment(s) ({}) \\\n             whose commits would also be published to {target_display}. Land the bottom segment \\\n             `{}`, or pass --whole-stack to land `{branch}` together with everything below it.\",\n            scan.lower_segments.len(),\n            scan.lower_segments.join(\", \"),\n            scan.lower_segments.last().expect(\"non-empty checked above\"),\n        );\n    }\n\n    if !scan.conflicted.is_empty() {\n        bail!(","sourceCodeStart":409,"sourceCodeEnd":445,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-api/src/land/mod.rs#L409-L445","documentation":"Error \"Refusing to land `{branch}`: {} commit(s) on unnamed segment(s) below it would also be published to {target_display}. Pass --whole-stack to land `{branch}` together with everything below it.\" thrown in gitbutlerapp/gitbutler.","triggerScenarios":"Thrown at crates/but-api/src/land/mod.rs:427 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}