{"record":{"id":"01d4f17004fd5557","repo":"GitoxideLabs/gitoxide","slug":"the-todo-cannot-edit-this-reference-namespace","errorCode":null,"errorMessage":"the todo cannot edit this reference namespace","messagePattern":"the todo cannot edit this reference namespace","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gix-tix/src/edit/todo.rs","lineNumber":1157,"sourceCode":"    }\n    let full = if input.starts_with(b\"refs/\") {\n        input.to_owned()\n    } else {\n        let mut full = BString::from(\"refs/heads/\");\n        full.extend_from_slice(input);\n        full\n    };\n    let name = gix::refs::FullName::try_from(full).context(\"the todo contains an invalid reference name\")?;\n    if name.as_bstr().starts_with(crate::history::PIN_PREFIX)\n        || name.as_bstr().starts_with(crate::history::STASH_PREFIX)\n        || name.as_bstr().starts_with(crate::history::REVIEW_PREFIX)\n        || super::undo::is_queue_ref(name.as_bstr())\n        || matches!(\n            name.category(),\n            Some(gix::refs::Category::Tag | gix::refs::Category::RemoteBranch)\n        )\n    {\n        anyhow::bail!(\"the todo cannot edit this reference namespace\");\n    }\n    if refs.iter().any(|reference| reference.name == name) {\n        anyhow::bail!(\"the todo cannot edit a hidden reference\");\n    }\n    let old = repo\n        .try_find_reference(name.as_ref())?\n        .map(|reference| {\n            reference\n                .try_id()\n                .map(gix::Id::detach)\n                .context(\"an existing symbolic reference outside the editable history cannot be moved\")\n        })\n        .transpose()?;\n    refs.push(rebase::ExpectedRef {\n        name: name.clone(),\n        old,\n        target: old.unwrap_or(repo.head_id()?.detach()),\n        new: old,","sourceCodeStart":1139,"sourceCodeEnd":1175,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/edit/todo.rs#L1139-L1175","documentation":"Namespace policy check inside `resolve_ref_name` during todo parsing. After expanding the input to a full ref name (prefixing `refs/heads/` when needed), the function rejects names falling into internal or reserved namespaces: history pin, stash, and review prefixes, the undo queue refs, and internal ref categories. These refs are managed by the tool itself, so a todo that creates, moves, or deletes them would corrupt its internal bookkeeping. Fired when a user writes a ref line targeting a reserved namespace; fix by choosing a normal branch name outside the reserved prefixes.","triggerScenarios":"Thrown at gix-tix/src/edit/todo.rs:1157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Edit the todo so it only updates ordinary branch references outside the reserved pin, stash, review, and undo-queue namespaces","Use the full refs/heads/<name> spelling to make clear the target is a normal branch, not a hidden or managed reference","Perform pin/stash/review queue operations through the dedicated tix commands instead of todo edit instructions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}