jdx/mise · error

comparing checkpoints requires git

Error message

comparing checkpoints requires git

What it means

`mise bootstrap dotfiles history diff` compares checkpoint snapshots stored in a git repository. If the checkpoint store has no git repo backing it (mise was built without git support or the store was never git-initialized), comparisons are impossible and mise throws "comparing checkpoints requires git".

Source

Thrown at src/cli/dotfiles/history/diff.rs:48

    /// Print the full patch instead of a per-file summary
    #[usage(long, short)]
    patch: bool,

    /// Restrict to one path (a file or a directory)
    #[usage(long, value_name = "PATH")]
    path: Option<String>,

    /// Exit 1 when the two sides differ
    #[usage(long)]
    exit_code: bool,
}

impl HistoryDiff {
    pub(crate) async fn run(self) -> Result<()> {
        let (store, tracked, entries) = super::open().await?;
        let Some(repo) = store.repo() else {
            bail!("comparing checkpoints requires git");
        };
        let path = self.path.as_deref().map(display_arg);
        let (from, to, label) =
            if self.operation {
                if self.b.is_some() {
                    bail!("--operation takes at most one checkpoint reference");
                }
                let outcome = match &self.a {
                    Some(reference) => super::resolve(reference, &entries, None)?,
                    None => entries
                        .iter()
                        .rev()
                        .find(|entry| entry.checkpoint.operation.is_some())
                        .cloned()
                        .ok_or_else(|| eyre::eyre!("no recorded operation"))?,
                };
                let operation =
                    outcome.checkpoint.operation.as_ref().ok_or_else(|| {

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Ensure mise is built/installed with git support (use the standard release binaries).
  2. Re-initialize the dotfiles history store so it is backed by a git repo.
  3. Check the history store directory for a `.git` folder; if missing, recreate it via the history init path or restore from backup.

Example fix

// before
mise bootstrap dotfiles history diff  # comparing checkpoints requires git
// after
# verify store has git backing, or reinstall standard mise build
mise bootstrap dotfiles history list
mise bootstrap dotfiles history diff
Defensive patterns

Strategy: fallback

Try / catch

# shell
if ! mise bootstrap dotfiles history diff "$@" 2>&1 | grep -q 'requires git'; then
  : # success
else
  echo "git-backed history unavailable; showing journal instead"
  mise bootstrap dotfiles history ls
fi

Prevention

When it happens

Trigger: Running `mise bootstrap dotfiles history diff` (or `mise dotfiles diff`) when `store.repo()` returns None — i.e. the dotfiles history store is not backed by a git repository.

Common situations: A mise build without git support; a history store created without git initialization; a corrupted or moved history directory missing its `.git`.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/c536501494c1701a. Report an issue: GitHub.