{"record":{"id":"313d96dae1798cbe","repo":"gitbutlerapp/gitbutler","slug":"the-repository-at-uses-the-currently-unsupporte-313d96","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":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/lib.rs","lineNumber":813,"sourceCode":"            .map(|()| DispatchOutcome::Return);\n        }\n        Subcommands::Edit { file } => {\n            let path = args.current_dir.join(&file);\n            return Ok(DispatchOutcome::ExitWithoutDestructors(\n                tui::editor::edit_file(&path),\n            ));\n        }\n        #[cfg(feature = \"legacy\")]\n        Subcommands::Setup { init } => {\n            let repo = match but_api::legacy::projects::add_project_best_effort(\n                args.current_dir.clone(),\n            )? {\n                gitbutler_project::AddProjectOutcome::Added(project)\n                | gitbutler_project::AddProjectOutcome::AlreadyExists(project) => {\n                    gix::open(project.git_dir())?\n                }\n                gitbutler_project::AddProjectOutcome::ReftableRefFormatUnsupported => {\n                    return Err(anyhow::anyhow!(\n                            \"The repository at {} uses the currently unsupported reftable reference format.\",\n                            args.current_dir.display()\n                        )\n                        .into());\n                }\n                _ => command::legacy::setup::find_or_initialize_repo(&args.current_dir, out, init)?,\n            };\n            let mut ctx = but_ctx::Context::from_repo_with_settings(repo, app_settings.clone())?;\n            let mut guard = ctx.exclusive_worktree_access();\n            return command::legacy::setup::repo(\n                &mut ctx,\n                &args.current_dir,\n                out,\n                guard.write_permission(),\n            )\n            .context(\"Failed to set up GitButler project.\")\n            .map(|()| DispatchOutcome::Return)\n            .map_err(CliError::from);","sourceCodeStart":795,"sourceCodeEnd":831,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but/src/lib.rs#L795-L831","documentation":"GitButler only supports the traditional loose/packed ref storage. When adding a project whose repository uses the newer `reftable` reference format, project add fails with this error because the required ref operations are not implemented for reftable.","triggerScenarios":"Running `but` (dispatch_subcommand) on a repository whose .git uses reftable; gitbutler_project::add_project returns AddProjectOutcome::ReftableRefFormatUnsupported and the CLI converts it into this anyhow error.","commonSituations":"Repository was cloned or created with a recent git version configured with `git config --global init.defaultRefFormat reftable` or `refs.format reftable`; repos created by tools defaulting to reftable.","solutions":["Convert the repository back to the files backend: `git refs migrate --ref-format=files` (git >= 2.45), then retry the command.","Disable the global reftable default: `git config --global --unset init.defaultRefFormat` or set it to `files`.","If conversion is not possible, clone the repository into a new repo that uses the files ref format and add that instead."],"exampleFix":"// before (in the target repo)\n$ git config extensions.refstorage reftable\n// after\n$ cd /path/to/repo\ngit refs migrate --ref-format=files\nrm .git/config # or: git config --unset extensions.refstorage","handlingStrategy":"validation","validationCode":"const fmt = fs.readFileSync('.git/refs/.extensions.refstorage', 'utf8').trim();\n// or: git rev-parse --show-ref-format\nif (fmt === 'reftable') throw new Error('convert repo: git refs migrate --ref-format=files');","typeGuard":null,"tryCatchPattern":"try {\n  addProject(dir);\n} catch (e) {\n  if (String(e).includes('reftable')) {\n    console.error('Repo uses reftable; run `git refs migrate --ref-format=files` first');\n  }\n  throw e;\n}","preventionTips":["Keep `init.defaultRefFormat=files` (or unset) in global git config.","Check ref format before pointing GitButler at a repo.","Keep git and GitButler versions aligned with supported formats."],"tags":["git","reftable","unsupported-format","repository-setup"],"backgroundTag":"unsupported-operation","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}