{"record":{"id":"9da3aabd6652a30d","repo":"gitbutlerapp/gitbutler","slug":"the-repository-at-uses-the-currently-unsupporte","errorCode":null,"errorMessage":"The repository at {} uses the currently unsupported reftable reference format.","messagePattern":"The repository at (.+?) uses the currently unsupported reftable reference format\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/command/legacy/setup.rs","lineNumber":258,"sourceCode":"            repo_path.display()\n        )),\n        gitbutler_project::AddProjectOutcome::BareRepository => Err(anyhow::anyhow!(\n            \"The repository at {} is bare. GitButler requires a non-bare repository.\",\n            repo_path.display()\n        )),\n        gitbutler_project::AddProjectOutcome::NonMainWorktree => Err(anyhow::anyhow!(\n            \"The repository at {} is a non-main worktree. GitButler requires the main worktree.\",\n            repo_path.display()\n        )),\n        gitbutler_project::AddProjectOutcome::NoWorkdir => Err(anyhow::anyhow!(\n            \"The repository at {} has no working directory. GitButler requires a working directory.\",\n            repo_path.display()\n        )),\n        gitbutler_project::AddProjectOutcome::NoDotGitDirectory => Err(anyhow::anyhow!(\n            \"The repository at {} has no .git directory. GitButler requires a .git directory.\",\n            repo_path.display()\n        )),\n        gitbutler_project::AddProjectOutcome::ReftableRefFormatUnsupported => Err(anyhow::anyhow!(\n            \"The repository at {} uses the currently unsupported reftable reference format.\",\n            repo_path.display()\n        )),\n        gitbutler_project::AddProjectOutcome::NotAGitRepository(_) => Err(anyhow::anyhow!(\n            \"The path {} is not a git repository.\",\n            repo_path.display()\n        )),\n    }?;\n\n    // A ported project can keep its target in Git config while the legacy `virtual_branches.toml`\n    // / database store is empty — for example after that store was reset. The check below would\n    // then see a target and report \"already set up\", but the workspace needs the legacy default\n    // target to work. Repair it from the workspace first so setup isn't a dead end.\n    if gitbutler_branch_actions::base::bootstrap_default_target_if_missing(&*ctx)?\n        && let Some(out) = out.for_human()\n    {\n        writeln!(\n            out,","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but/src/command/legacy/setup.rs#L240-L276","documentation":"Raised while registering a repository: the repo uses git's reftable reference storage backend (`AddProjectOutcome::ReftableRefFormatUnsupported`), which the gix-based stack GitButler builds on does not yet support. Only the classic 'files' ref backend (loose refs + packed-refs) is accepted.","triggerScenarios":"Setup against a repository created or migrated with `git init --ref-format=reftable`, or cloned from a reftable upstream; typically after opting in globally via `git config --global init.defaultRefFormat reftable` or the `extensions.refformat=reftable` config.","commonSituations":"Early adopters of the experimental reftable backend (git >= 2.45); machines where another tool or tutorial enabled reftable by default; repos shared from a reftable-configured workstation.","solutions":["Re-clone the repository with the files backend: `git clone --ref-format=files <url>` and register the new clone","Check and unset the global opt-in so future repos work: `git config --global --get init.defaultRefFormat`, then `git config --global --unset init.defaultRefFormat`","For a brand-new local repo: delete it and `git init --ref-format=files` again (there is no supported reftable-to-files downgrade)","Track GitButler/gix releases for reftable support instead of working around it in place"],"exampleFix":"# before: reftable repo rejected\nbut setup ~/work/project\n\n# after: fresh clone on the files backend\ngit clone --ref-format=files git@example.com:project.git ~/work/project-fresh\nbut setup ~/work/project-fresh","handlingStrategy":"validation","validationCode":"let fmt = std::process::Command::new(\"git\")\n    .args([\"-C\", repo_path.to_str().unwrap(), \"config\", \"--get\", \"extensions.refformat\"])\n    .output()?;\nif String::from_utf8_lossy(&fmt.stdout).trim() == \"reftable\" {\n    anyhow::bail!(\"repo uses reftable refs, which is unsupported; re-clone with --ref-format=files\");\n}","typeGuard":"fn is_reftable(out: &gitbutler_project::AddProjectOutcome) -> bool {\n    matches!(out, gitbutler_project::AddProjectOutcome::ReftableRefFormatUnsupported)\n}","tryCatchPattern":"match add_project(&repo_path) {\n    Ok(out) if is_reftable(&out) => { /* re-clone with --ref-format=files */ }\n    Ok(out) => { /* other outcomes */ }\n    Err(err) if err.to_string().contains(\"reftable\") => { /* reftable guidance */ }\n    Err(err) => return Err(err),\n}","preventionTips":["Keep `init.defaultRefFormat` unset (files backend) on machines that also run GitButler tooling","When cloning from reftable experiments, pass `--ref-format=files` explicitly","There is no in-place downgrade; plan a re-clone instead of debugging the rejection"],"tags":["rust","cli","setup","git","reftable","unsupported-feature"],"backgroundTag":"git-reftable-unsupported","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}