{"record":{"id":"a6f0f529451ca8b7","repo":"gitbutlerapp/gitbutler","slug":"implement-list-and-call-recursively","errorCode":null,"errorMessage":"implement list and call recursively","messagePattern":"implement list and call recursively","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/lib.rs","lineNumber":948,"sourceCode":"            }\n            Some(alias_args::Subcommands::Add {\n                name,\n                value,\n                global,\n            }) => {\n                command::alias::add(&mut ctx, out, &name, &value, global.into())\n                    .emit_metrics(metrics_ctx)?;\n                None\n            }\n            Some(alias_args::Subcommands::Remove { name, global }) => {\n                command::alias::remove(&mut ctx, out, &name, global.into())\n                    .emit_metrics(metrics_ctx)?;\n                None\n            }\n        },\n        Subcommands::Branch(branch::Platform { cmd }) => match cmd {\n            #[cfg(not(feature = \"legacy\"))]\n            None => todo!(\"implement list and call recursively\"),\n            #[cfg(feature = \"legacy\")]\n            None => {\n                command::legacy::branch::handle_no_subcommand(&mut ctx, out)?;\n                None\n            }\n            #[cfg(feature = \"legacy\")]\n            Some(branch::Subcommands::List {\n                filter,\n                local,\n                remote,\n                all,\n                no_ahead,\n                review,\n                no_check,\n                empty,\n            }) => {\n                command::legacy::branch::list_branches(\n                    &mut ctx, out, filter, local, remote, all, no_ahead, review, no_check, empty,","sourceCodeStart":930,"sourceCodeEnd":966,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but/src/lib.rs#L930-L966","documentation":"Running `but branch` with no subcommand in a CLI build compiled WITHOUT the `legacy` feature hits a `todo!` - plain branch listing is only implemented in the legacy path (`command::legacy::branch::handle_no_subcommand`). The non-legacy list implementation is still missing (crates/but/src/lib.rs:948).","triggerScenarios":"Building the `but` binary without `--features legacy`, then running `but branch` (no subcommand). With the feature enabled the same invocation routes to the legacy handler instead.","commonSituations":"Switching between legacy and non-legacy builds (feature-flag or packaging change); CI building the default feature set; users of experimental non-legacy builds.","solutions":["Rebuild with the legacy feature enabled: `cargo build -p but --features legacy`, then rerun `but branch`","Use an explicit implemented subcommand instead of bare `but branch`","Track upstream until the non-legacy branch list is implemented and the todo removed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Guard the bare-subcommand path in builds without legacy\n#[cfg(not(feature = \"legacy\"))]\nif cmd.is_none() {\n    anyhow::bail!(\"`but branch` without a subcommand requires a build with the 'legacy' feature; pass a subcommand or rebuild with --features legacy\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build with `--features legacy` when the plain `but branch` listing is needed","Smoke-test the exact binary you ship with `but branch --help` before release","Track feature-flag changes in packaging so non-legacy builds do not reach unimplemented subcommands"],"tags":["rust","cli","feature-flags","todo","unimplemented","but"],"backgroundTag":"unimplemented-todo-panic","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}