{"record":{"id":"3148161155760b9b","repo":"gitbutlerapp/gitbutler","slug":"need-to-specify-a-rev-spec-of-form-a-b-to-indic","errorCode":null,"errorMessage":"Need to specify a rev-spec of form `a..b` to indicate an exclusion for now.","messagePattern":"Need to specify a rev-spec of form `a\\.\\.b` to indicate an exclusion for now\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-debug/src/command/revision.rs","lineNumber":68,"sourceCode":"    let mut graph_commits = vec![included];\n    graph_commits.extend(excluded);\n\n    let graph_tips = args_to_tips(repo, &log_args.graph)?;\n    let graph = {\n        let _span =\n            tracing::info_span!(\"build graph\", commit_count = graph_commits.len()).entered();\n        graph_for_revisions(repo, meta, &graph_commits, graph_tips)?\n    };\n\n    let _span = tracing::info_span!(\"traverse graph\").entered();\n    let commits = if let Some(excluded) = excluded {\n        graph.find_commit_ids_reachable_from_a_not_b(\n            included,\n            excluded,\n            FirstParent::from(log_args.first_parent),\n        )?\n    } else {\n        bail!(\"Need to specify a rev-spec of form `a..b` to indicate an exclusion for now.\")\n    };\n\n    let mut out = io::BufWriter::new(out);\n    for commit_id in commits {\n        commit_id.write_hex_to(&mut out)?;\n        writeln!(out)?;\n    }\n    Ok(())\n}\n\nfn merge_base(\n    repo: &gix::Repository,\n    meta: &EmptyRefMetadata,\n    merge_base_args: &MergeBaseArgs,\n    out: &mut dyn io::Write,\n) -> Result<()> {\n    let commits = {\n        let _span = tracing::info_span!(","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-debug/src/command/revision.rs#L50-L86","documentation":"In `but revision log`, even after a spec parses, the traversal step currently only implements `find_commit_ids_reachable_from_a_not_b`, which requires an excluded endpoint. A single-commit `Spec::Include` reaches this else-branch and bails: for now the command requires the `a..b` form. It's a temporary implementation limit, stated explicitly by the message.","triggerScenarios":"Running `but revision log <single-rev>` (e.g. `but revision log HEAD`) — the spec parses as `Spec::Include` with no `excluded`, so traversal refuses.","commonSituations":"Expecting `git log <rev>` behavior from `but revision log`; scripts calling it with one revision.","solutions":["Always pass a range: `but revision log main..HEAD`.","Pick an explicit base you want excluded (parent, main, tag) for the left side of `..`.","For plain single-commit inspection, use git itself (`git show <rev>`) or other but subcommands until the command supports Include specs."],"exampleFix":"# before\nbut revision log HEAD\n\n# after\nbut revision log main..HEAD","handlingStrategy":"validation","validationCode":"# Shell — enforce the a..b form up front\nif ! [[ \"$1\" == *..* ]]; then\n  echo \"revision log currently requires a range like main..HEAD\" >&2\n  exit 2\nfi\nbut revision log \"$1\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always supply an explicit base: `but revision log <base>..<tip>`.","Wrap the CLI in scripts that rewrite bare revs into `<rev>^..<rev>` or `main..<rev>` automatically.","Track GitButler releases — the 'for now' wording means single-rev support may land later."],"tags":["rev-spec","cli","revision-log","not-implemented"],"backgroundTag":"unsupported-revspec-form","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}