jdx/mise · error
this store uses the old unreleased checkpoint format; use a…
Error message
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
What it means
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.
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
Example fix
# before: old-format state dir export MISE_STATE_DIR=~/.local/state/mise # after export MISE_STATE_DIR=~/.local/state/mise-history-new
Defensive patterns
Strategy: fallback
Validate before calling
if std::process::Command::new("git")
.args(["for-each-ref", "refs/checkpoints/"])
.current_dir(format!("{state_dir}/history.git"))
.output().map(|o| !o.stdout.is_empty()).unwrap_or(false)
{
eprintln!("old checkpoint format detected; point MISE_STATE_DIR elsewhere");
} Try / catch
match history.open_or_init() {
Err(e) if e.to_string().contains("old unreleased checkpoint format") => {
std::env::set_var("MISE_STATE_DIR", fresh_dir);
history.open_or_init()?;
}
other => other?,
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Upgrading from a dev/nightly mise that used the old format; sharing a state dir across mise versions; old CI containers with experimental state.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- checked by the caller
- history changed during the operation; cannot replace its…
- local and origin histories are unrelated; use a fresh setup…
- is not in either snapshot
- path is not in either snapshot
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/58931a4612c44c41.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/history/shadow.rs:331
/// Opens the repository, creating it on first use. `Ok(None)` means no
/// git binary mise is willing to run is available.
pub(crate) fn open_or_init_in(state_dir: &Path) -> Result<Option<Self>> {
if crate::git::plumbing_binary().is_none() {
return Ok(None);
}
let git = GitPlumbing::new(Self::path_in(state_dir));
git.init_bare()
.wrap_err_with(|| format!("initializing {}", display_path(git.git_dir())))?;
// the binary may exist and still be unusable (a stub, a broken
// install): probe it once so callers can say capture is unavailable
git.run(PlumbingCall::new(["rev-parse", "--is-bare-repository"]))
.wrap_err_with(|| format!("opening {}", display_path(git.git_dir())))?;
let repo = Self {
git,
transient: Default::default(),
};
if !repo.list_refs("refs/checkpoints/")?.is_empty() {
bail!(
"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"
);
}
Ok(Some(repo))
}
pub(crate) fn dir(&self) -> &Path {
self.git.git_dir()
}
pub(crate) fn capture_tracked(
&self,
walk: &super::tracked::Walk,
recipient_strings: &[String],
interactive: bool,
) -> Result<CaptureResult> {
let mut manifest = walk.manifest.clone();
manifest.recipients = recipient_strings.to_vec();View on GitHub (pinned to 533346cc37)