{"record":{"id":"323a2797967a5e54","repo":"jdx/mise","slug":"not-connected","errorCode":null,"errorMessage":"not connected","messagePattern":"not connected","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/origin.rs","lineNumber":178,"sourceCode":"            differing.len()\n        );\n        for path in differing.iter().take(10) {\n            miseprintln!(\"  differs: {path}\");\n        }\n    }\n    miseprintln!(\n        \"All committed versions of explicitly tracked files are eligible for synchronization. Untracking does not erase earlier versions.\"\n    );\n    let config_dir = crate::system::history::tracked::global_config_dir();\n    if config_dir.join(\".git\").exists() {\n        miseprintln!(\n            \"{} is a git checkout: enabling history does not convert or migrate it; applied files appear there as ordinary working-tree changes.\",\n            display_path(&config_dir)\n        );\n    }\n    let mut status = run::read_status(state_dir)?;\n    if !confirmed(opts.yes, \"Connect this setup repository?\")? {\n        bail!(\"not connected\");\n    }\n    *accepted = true;\n\n    // the mode is recorded only when it differs from what the settings\n    // say, so `mise settings set history.sync …` keeps working afterwards\n    let mode =\n        (opts.mode.as_str() != crate::config::Settings::get().history.sync).then_some(opts.mode);\n    write_config(&opts.url, &opts.branch, mode)?;\n    // another repository or branch starts from a clean slate: the previous\n    // one's per-path state, pending changes, and conflicts would read its\n    // absence of a file as a deletion\n    if connected_before && !same_origin {\n        reset_sync_state(repo)?;\n        status = run::SyncStatus::default();\n        info!(\n            \"history: a different setup repository; the previous one's sync state is discarded (local checkpoints are kept)\"\n        );\n    }","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/sync/origin.rs#L160-L196","documentation":"State precondition in origin operations (set_inner): the machine has no configured history origin — no repository connection exists — so a disconnect/sync action targeting the origin has nothing to act on. This is a sentinel bail for 'no origin configured'.","triggerScenarios":"Thrown at src/system/history/sync/origin.rs:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `mise bootstrap dotfiles origin set <url>` to connect a repository first","Verify the global config file contains a [history.origin] table","Re-run the origin operation after connecting"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}