jdx/mise · error
repos
Error message
repos: {}: {reason} What it means
When repo status inspection yields RepoState::Conflict(reason), preflight_statuses aborts with `repos: <path>: <reason>`. Conflicts cover conditions where the checkout cannot be safely reconciled, e.g. the configured origin URL differs from the checkout's origin or a ref mismatch that preflight cannot auto-resolve. The embedded reason describes the specific conflict.
Solutions
- Update the checkout's remote to match config: `git -C <path> remote set-url origin <configured-url>`
- Or update the config `url` to match the existing checkout's actual origin
- Back up and delete the conflicting directory so bootstrap can re-clone from the configured url
Example fix
# before (origin mismatch) mise bootstrap # repos: ~/src/dotfiles: origin ... does not match ... # after git -C ~/src/dotfiles remote set-url origin https://github.com/jdx/dotfiles.git mise bootstrap
Defensive patterns
Strategy: validation
Validate before calling
configured=$(git -C <repo-path> config --get remote.origin.url); echo "origin: $configured" # compare with the url in mise.toml (transport-agnostically)
Try / catch
match result {
Err(e) if e.to_string().contains("repos:") && !e.to_string().contains("local changes") => {
eprintln!("fix the origin/remote mismatch described: {e}");
}
Err(e) => return Err(e),
Ok(v) => v,
} Prevention
- Keep each checkout directory dedicated to a single remote; don't reuse directories across projects
- When changing `url` in config, run `git remote set-url origin` on existing checkouts first
- Ensure expected repo paths contain a git repo, not arbitrary content
When it happens
Trigger: Bootstrap detects a repo whose `origin` remote points at a different repository than the configured `url`, or other conflicting state surfaced by `status_one` as Conflict(reason).
Common situations: Reusing an existing directory (e.g. `~/src/dotfiles` from a different remote fork) for a new repo entry; re-pointing `url` in config after the checkout was cloned from the old remote; a non-git directory where a repo is expected.
Understand the failure class
Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.
Related errors
- repos: has local changes; commit, stash, or clean them…
- exists but is not a git checkout with an origin remote
- git clone failed with
- git command failed with
- has origin , expected
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/f1c0d16f9f5a4d1b.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/repos.rs:170
pub(crate) async fn status(requests: &[RepoRequest]) -> Result<Vec<RepoStatus>> {
crate::parallel::parallel(requests.to_vec(), |request| async move {
tokio::task::spawn_blocking(move || status_one(&request)).await?
})
.await
}
pub(crate) fn preflight_statuses(statuses: &[RepoStatus]) -> Result<()> {
for status in statuses {
match &status.state {
RepoState::Dirty => {
bail!(
"repos: {} has local changes; commit, stash, or clean them before bootstrap",
status.request
);
}
RepoState::Conflict(reason) => {
bail!("repos: {}: {reason}", status.request);
}
RepoState::Current | RepoState::Missing | RepoState::Differs => {}
}
}
Ok(())
}
/// Apply statuses previously validated with [`preflight_statuses`].
pub(crate) fn apply_statuses(statuses: &[RepoStatus], dry_run: bool) -> Result<()> {
for status in statuses {
match &status.state {
RepoState::Current => {
info!("repos: {} already current", status.request);
}
RepoState::Missing => clone_repo(&status.request, dry_run)?,
RepoState::Differs => update_repo(&status.request, dry_run)?,
RepoState::Dirty | RepoState::Conflict(_) => unreachable!("preflighted above"),
}View on GitHub (pinned to 533346cc37)