{"record":{"id":"24a0efb7a936cb0d","repo":"jdx/mise","slug":"listing-snapshot-files-requires-git","errorCode":null,"errorMessage":"listing snapshot files requires git","messagePattern":"listing snapshot files requires git","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/history/show.rs","lineNumber":148,"sourceCode":"        }\n        for incomplete in &coverage.incomplete {\n            miseprintln!(\"  incomplete: {} ({})\", incomplete.path, incomplete.reason);\n        }\n        if let Some(operation) = &c.operation\n            && !operation.journal.is_empty()\n        {\n            miseprintln!(\"\");\n            miseprintln!(\"Journal:\");\n            for line in journal::render(&operation.journal) {\n                miseprintln!(\"  - {line}\");\n            }\n        }\n        if self.files {\n            let Some(tree) = &c.tree.snapshot else {\n                bail!(\"checkpoint {} has no content snapshot\", entry.id);\n            };\n            let Some(repo) = store.repo() else {\n                bail!(\"listing snapshot files requires git\");\n            };\n            miseprintln!(\"\");\n            miseprintln!(\"Files:\");\n            for file in repo.ls_tree(tree)? {\n                let size = file.size.map(|size| size.to_string()).unwrap_or_default();\n                miseprintln!(\n                    \"  {} {:>8} {}\",\n                    file.mode,\n                    size,\n                    crate::system::history::tracked::tree_path_to_display(&file.path)\n                );\n            }\n        }\n        Ok(())\n    }\n}\n\npub(crate) fn policy(autosave: bool) -> String {","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/dotfiles/history/show.rs#L130-L166","documentation":"Listing the files inside a checkpoint's content snapshot requires git (`repo.ls_tree`). If the checkpoint has a snapshot tree reference but the history store has no git repository backing it (`store.repo()` is None), mise cannot enumerate the tree and throws \"listing snapshot files requires git\".","triggerScenarios":"Running `mise bootstrap dotfiles history show <id> --files` where the checkpoint has `tree.snapshot` set but `store.repo()` returns None (mise built without git, or the store lacks git backing).","commonSituations":"A mise build without git support used on a store that does record snapshot refs; a history store whose git metadata was stripped or corrupted during sync/backup.","solutions":["Install/use a mise build with git support (standard release binaries).","Re-initialize or restore the history store's git repository.","View the checkpoint journal without `--files` as a fallback for what changed."],"exampleFix":"// before\nmise bootstrap dotfiles history show abc123 --files  # requires git\n// after\n# reinstall mise with git support, then:\nmise bootstrap dotfiles history show abc123 --files","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"# fall back to journal view when git tree listing is unavailable\nif ! mise bootstrap dotfiles history show \"$id\" --files 2>/dev/null; then\n  mise bootstrap dotfiles history show \"$id\"\nfi","preventionTips":["Use mise builds compiled with git support.","Avoid stripping .git from the dotfiles history store during backups/syncs."],"tags":["dotfiles","git","history"],"backgroundTag":"missing-dependency","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}