{"record":{"id":"31ed63de46fd99e4","repo":"gitbutlerapp/gitbutler","slug":"unsupported-rev-spec-for-revision-log-other","errorCode":null,"errorMessage":"Unsupported rev-spec for revision log: {other}","messagePattern":"Unsupported rev-spec for revision log: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-debug/src/command/revision.rs","lineNumber":48,"sourceCode":"        }\n    }\n}\n\nfn log(\n    repo: &gix::Repository,\n    meta: &EmptyRefMetadata,\n    log_args: &LogArgs,\n    out: &mut dyn io::Write,\n) -> Result<()> {\n    let parsed = repo\n        .rev_parse(log_args.rev_spec.as_str())\n        .with_context(|| format!(\"Failed to parse rev-spec '{}'\", log_args.rev_spec))?\n        .detach();\n\n    let (included, excluded) = match parsed {\n        Spec::Include(commit_id) => (commit_id, None),\n        Spec::Range { from, to } => (to, Some(from)),\n        other => bail!(\"Unsupported rev-spec for revision log: {other}\"),\n    };\n    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        )?","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-debug/src/command/revision.rs#L30-L66","documentation":"`but revision log` parses the rev-spec with gix and only handles two `Spec` outcomes: `Include` (single commit) and `Range` (`a..b`). Any other parsed form — e.g. `Spec::Exclude` from `..b`-style specs or other plumbing spec variants — hits this bail, printing the spec kind. The spec parsed successfully; it's the shape that's unsupported.","triggerScenarios":"Passing a rev-spec that gix parses into a non-Include/non-Range spec, such as an exclude-only spec (`..branch`), since `revision log` only knows how to drive inclusion plus at most one exclusion.","commonSituations":"Muscle-memory git log syntax (`git log ..next`, `^ref` forms) carried over to `but revision log`; scripts reusing rev-specs from other git commands.","solutions":["Use an explicit range: `but revision log a..b`.","Use a single include spec `but revision log <rev>` — but note this command additionally requires a range for the exclusion step, so prefer `a..b`.","Check the printed `{other}` variant to see which spec shape you produced and rewrite the spec into `a..b` form."],"exampleFix":"# before\nbut revision log ..feature-x\n\n# after\nbut revision log main..feature-x","handlingStrategy":"validation","validationCode":"# Shell — accept only forms this command supports\nspec=\"$1\"\ncase \"$spec\" in\n  *..*) ;;                # a..b style is fine\n  *) echo \"use a..b form\" >&2; exit 2 ;;\nesac\nbut revision log \"$spec\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize rev-specs to `a..b` before passing them to `but revision log`.","Don't reuse spec strings crafted for `git log`/`git rev-list` verbatim; verify each with `git rev-parse --verify <spec>` semantics first.","Read the printed `{other}` variant — it tells you exactly which spec shape gix produced."],"tags":["rev-spec","cli","revision-log","argument-validation"],"backgroundTag":"unsupported-revspec-form","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}