{"record":{"id":"f8d6abe5fc7f7efb","repo":"jdx/mise","slug":"edits-cannot-diff-these-entries-fix-them-manuall","errorCode":null,"errorMessage":"edits: cannot diff these entries, fix them manually:\n{}","messagePattern":"edits: cannot diff these entries, fix them manually:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/edits.rs","lineNumber":852,"sourceCode":"        }\n        changed = true;\n        miseprintln!(\n            \"edit differs: {} ({})\",\n            req.path.display_user(),\n            req.describe_op()\n        );\n        let mut opts = diffy::DiffOptions::new();\n        opts.set_original_filename(format!(\"{} (current)\", req.path.display_user()))\n            .set_modified_filename(format!(\n                \"{} (desired: {})\",\n                req.path.display_user(),\n                req.describe_op()\n            ));\n        let patch = opts.create_patch(&current, &output);\n        miseprint!(\"{}\", diffy::PatchFormatter::new().fmt_patch(&patch))?;\n    }\n    if !problems.is_empty() {\n        bail!(\n            \"edits: cannot diff these entries, fix them manually:\\n{}\",\n            problems.join(\"\\n\")\n        );\n    }\n    if !changed {\n        info!(\"edits: all edits are applied\");\n    }\n    Ok(())\n}\n\npub(crate) struct UnapplyOpts {\n    pub dry_run: bool,\n    pub verbose: bool,\n    /// plain line edits have no ownership marker, so removing them requires\n    /// explicit confirmation that the configured line should be removed\n    pub force: bool,\n    pub yes: bool,\n}","sourceCodeStart":834,"sourceCodeEnd":870,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/edits.rs#L834-L870","documentation":"mise's `edits` diff printer (print_diffs) renders a unified diff of managed edits, but some EditRequests cannot be turned into a patch — for example symlinked targets, which mise refuses to rewrite. Before printing, any requests that produced problems are reported so the user can fix those files by hand, and the command aborts with this error listing them.","triggerScenarios":"Calling `mise edits diff` (print_diffs) when one or more edit requests hit a precheck problem — typically the target path is a symlink (SYMLINK_REASON: \"target is a symlink; edit the real file instead\") — so create_patch/rewrite cannot safely proceed.","commonSituations":"A dotfile was replaced by a symlink (e.g. by stow, GNU stow, or another dotfile manager, or by mise's own dotfiles symlink modes) while it is also declared as a managed edit; the user then runs `mise edits diff` and gets this error naming the affected entries.","solutions":["Read the listed entries and determine why each cannot be diffed (usually symlink).","Edit the symlink's real target file manually, or remove the symlink so the file is a regular file mise can edit.","Remove the edit/block declaration from mise.toml if the file is intentionally managed by another tool.","Re-run `mise edits diff` to confirm the problem list is empty."],"exampleFix":"// before: mise.toml manages a block in ~/.zshrc which is a symlink to ~/dotfiles/zshrc\n[edits]\n\"~/.zshrc\" = { block = \"...\" }\n\n// after: point the edit at the real file (or de-symlink ~/.zshrc)\n[edits]\n\"~/dotfiles/zshrc\" = { block = \"...\" }","handlingStrategy":"validation","validationCode":"# before diffing, ensure every edit target is a regular file\nfor f in ~/.zshrc ~/.gitconfig; do\n  [ -L \"$f\" ] && echo \"symlinked, fix manually: $f\"\ndone","typeGuard":"const isRegularFile = (p: string) => fs.lstatSync(p).isFile(); // lstat: symlink fails","tryCatchPattern":null,"preventionTips":["Keep edit targets as regular files; let mise's dotfiles modes own symlinking","Don't run another dotfile manager over paths mise manages edits for","Run `mise edits diff` after config changes to catch blocked entries early"],"tags":["rust","dotfiles","config","symlink"],"backgroundTag":"conflicting-config-options","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"}