{"record":{"id":"381414a3da974c36","repo":"nikivdev/code","slug":"all-cannot-be-combined-with-hash-use-f-commit","errorCode":null,"errorMessage":"--all cannot be combined with HASH. Use `f commit-queue approve --all`.","messagePattern":"--all cannot be combined with HASH\\. Use `f commit-queue approve --all`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":9208,"sourceCode":"                clean, with_issues, timed_out, failed\n            );\n\n            if failed > 0 {\n                bail!(\"Some queued commit reviews failed. Resolve errors and re-run.\");\n            }\n        }\n        CommitQueueAction::Approve {\n            all,\n            hash,\n            queue_if_missing,\n            mark_reviewed,\n            force,\n            allow_issues,\n            allow_unreviewed,\n        } => {\n            if all {\n                if hash.is_some() {\n                    bail!(\n                        \"--all cannot be combined with HASH. Use `f commit-queue approve --all`.\"\n                    );\n                }\n                if queue_if_missing {\n                    eprintln!(\"note: --queue-if-missing is ignored when using --all\");\n                }\n                if mark_reviewed {\n                    eprintln!(\"note: --mark-reviewed is ignored when using --all\");\n                }\n                return approve_all_queued_commits(\n                    &repo_root,\n                    force,\n                    allow_issues,\n                    allow_unreviewed,\n                );\n            }\n\n            git_guard::ensure_clean_for_push(&repo_root)?;","sourceCodeStart":9190,"sourceCodeEnd":9226,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L9190-L9226","documentation":"Argument validation for `f commit-queue approve` (src/commit.rs:9208): passing `--all` together with a positional HASH is contradictory (approve everything vs. approve one), so the CLI bails with the correct usage.","triggerScenarios":"Invoking `f commit-queue approve --all <hash>` — both the --all flag and a HASH argument supplied at once.","commonSituations":"Copy-pasted command lines that combined flags; shell scripts building arguments conditionally and appending both; assuming --all silently takes precedence.","solutions":["Drop the HASH and use `f commit-queue approve --all`, or","drop `--all` and approve only the specific hash: `f commit-queue approve <hash>`.","Fix the script to emit either --all or a hash, never both."],"exampleFix":"// before\nf commit-queue approve --all 9abc123\n// after\nf commit-queue approve --all\n// or\nf commit-queue approve 9abc123","handlingStrategy":"validation","validationCode":"if all && hash.is_some() {\n    bail!(\"--all cannot be combined with HASH; choose one mode\");\n}","typeGuard":null,"tryCatchPattern":"match approve(all, hash) {\n    Err(e) if e.to_string().contains(\"cannot be combined with HASH\") => {\n        eprintln!(\"{e}\");\n    }\n    other => other?,\n}","preventionTips":["In scripts, branch on mode: emit either `--all` or a hash, never both.","Wrap commit-queue invocations in a small helper that enforces arg exclusivity.","Read `f commit-queue approve --help` before composing flags."],"tags":["cli","argument-validation","commit-queue","usage-error"],"backgroundTag":"conflicting-cli-flags","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}