{"record":{"id":"c2ca3f6bd930a98c","repo":"jdx/mise","slug":"inspecting-conflicts-requires-git","errorCode":null,"errorMessage":"inspecting conflicts requires git","messagePattern":"inspecting conflicts requires git","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/conflicts.rs","lineNumber":43,"sourceCode":"    paths: Vec<PathBuf>,\n\n    /// Open the comparison in Git's configured diff or merge tool\n    #[usage(long)]\n    difftool: bool,\n\n    /// Use this Git diff tool instead of the configured default\n    #[usage(long, value_name = \"TOOL\", requires = \"difftool\")]\n    tool: Option<String>,\n}\n\nimpl DotfilesConflicts {\n    pub(crate) async fn run(self) -> Result<()> {\n        if !crate::config::Settings::get().history.enabled {\n            bail!(\"history is disabled (history.enabled = false)\");\n        }\n        let (store, tracked, _) = super::history::open().await?;\n        let Some(repo) = store.repo() else {\n            bail!(\"inspecting conflicts requires git\");\n        };\n        let sync_lock = run::lock(&store)?;\n        let mut status = run::read_status(store.state_dir())?;\n        run::refresh_with_interaction(\n            &store,\n            &tracked,\n            &mut status,\n            console::user_attended_stderr(),\n        )?;\n        // Keep the conflict objects stable while encrypted blobs are refreshed,\n        // then release the sync lock before an interactive difftool can block.\n        drop(sync_lock);\n        let selected = select(&status.conflicts, &self.paths)?;\n        if selected.is_empty() {\n            info!(\"no sharing conflicts\");\n            return Ok(());\n        }\n        for (path, conflict) in selected {","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/dotfiles/conflicts.rs#L25-L61","documentation":"The conflicts command uses the dotfiles history git repository to compute local/remote sides of a conflict. When the history store has no git repo backing it (git is unavailable or the store isn't a git repo), the command bails, since conflict inspection cannot proceed without git.","triggerScenarios":"`mise dot conflicts` runs, history is enabled, but `store.repo()` returns None — typically git is not installed/on PATH or the history directory lacks a git repository.","commonSituations":"Git not installed in the environment (containers, CI images); history directory corrupted or created without git; PATH stripped so `git` is missing.","solutions":["Install git (or fix PATH so `git` is available) and re-run the command","Re-initialize the dotfiles history store (e.g. re-run `mise dot` history sync commands so the repo is created)","Check that the history directory exists and is a git repo (`git -C <history-dir> status`)"],"exampleFix":"// before (git missing in container)\n$ mise dot conflicts\nerror: inspecting conflicts requires git\n// after\n$ apt-get install -y git\n$ mise dot conflicts","handlingStrategy":"validation","validationCode":"command -v git >/dev/null || echo \"git is required for mise dot conflicts\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install git in containers/CI images that run mise dot commands","Verify the history store is a git repo if history was restored from backup"],"tags":["dotfiles","git","dependency"],"backgroundTag":"missing-dependency","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"}