{"record":{"id":"58931a4612c44c41","repo":"jdx/mise","slug":"this-store-uses-the-old-unreleased-checkpoint-form","errorCode":null,"errorMessage":"this store uses the old unreleased checkpoint format; use a separate MISE_STATE_DIR for the new history format; existing data has not been changed","messagePattern":"this store uses the old unreleased checkpoint format; use a separate MISE_STATE_DIR for the new history format; existing data has not been changed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/shadow.rs","lineNumber":331,"sourceCode":"    /// Opens the repository, creating it on first use. `Ok(None)` means no\n    /// git binary mise is willing to run is available.\n    pub(crate) fn open_or_init_in(state_dir: &Path) -> Result<Option<Self>> {\n        if crate::git::plumbing_binary().is_none() {\n            return Ok(None);\n        }\n        let git = GitPlumbing::new(Self::path_in(state_dir));\n        git.init_bare()\n            .wrap_err_with(|| format!(\"initializing {}\", display_path(git.git_dir())))?;\n        // the binary may exist and still be unusable (a stub, a broken\n        // install): probe it once so callers can say capture is unavailable\n        git.run(PlumbingCall::new([\"rev-parse\", \"--is-bare-repository\"]))\n            .wrap_err_with(|| format!(\"opening {}\", display_path(git.git_dir())))?;\n        let repo = Self {\n            git,\n            transient: Default::default(),\n        };\n        if !repo.list_refs(\"refs/checkpoints/\")?.is_empty() {\n            bail!(\n                \"this store uses the old unreleased checkpoint format; use a separate MISE_STATE_DIR for the new history format; existing data has not been changed\"\n            );\n        }\n        Ok(Some(repo))\n    }\n\n    pub(crate) fn dir(&self) -> &Path {\n        self.git.git_dir()\n    }\n\n    pub(crate) fn capture_tracked(\n        &self,\n        walk: &super::tracked::Walk,\n        recipient_strings: &[String],\n        interactive: bool,\n    ) -> Result<CaptureResult> {\n        let mut manifest = walk.manifest.clone();\n        manifest.recipients = recipient_strings.to_vec();","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/shadow.rs#L313-L349","documentation":"open_or_init_in detects a pre-existing checkpoint git store that uses an old, unreleased refs/checkpoints format. The new history format is incompatible, and rather than corrupting or misreading existing data, opening is refused with migration guidance; the existing data is untouched.","triggerScenarios":"Opening the history store in a MISE_STATE_DIR whose git repo already has refs under refs/checkpoints/ created by an older experimental mise build.","commonSituations":"Upgrading from a dev/nightly mise that used the old format; sharing a state dir across mise versions; old CI containers with experimental state.","solutions":["Set MISE_STATE_DIR to a fresh directory for the new history format","Archive or delete the old state dir if its data is no longer needed (it is not modified by the error path)","If the old checkpoints matter, inspect the old repo with git manually; there is no automatic migration"],"exampleFix":"# before: old-format state dir\nexport MISE_STATE_DIR=~/.local/state/mise\n# after\nexport MISE_STATE_DIR=~/.local/state/mise-history-new","handlingStrategy":"fallback","validationCode":"if std::process::Command::new(\"git\")\n    .args([\"for-each-ref\", \"refs/checkpoints/\"])\n    .current_dir(format!(\"{state_dir}/history.git\"))\n    .output().map(|o| !o.stdout.is_empty()).unwrap_or(false)\n{\n    eprintln!(\"old checkpoint format detected; point MISE_STATE_DIR elsewhere\");\n}","typeGuard":null,"tryCatchPattern":"match history.open_or_init() {\n    Err(e) if e.to_string().contains(\"old unreleased checkpoint format\") => {\n        std::env::set_var(\"MISE_STATE_DIR\", fresh_dir);\n        history.open_or_init()?;\n    }\n    other => other?,\n}","preventionTips":["Use a fresh MISE_STATE_DIR when switching from dev/nightly builds to releases","Don't share one state dir across mise versions","Back up old state dirs before upgrading"],"tags":["migration","git","history","incompatible-format"],"backgroundTag":"incompatible-source-type","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}