Skip to content

fix(bootstrap): stop reporting freshly cloned repos as dirty with core.autocrlf - #14225

Merged
jdx merged 1 commit into
mainfrom
claude/github-issue-14223-9806d3
Oct 9, 2026
Merged

jdx merged 1 commit into
mainfrom
claude/github-issue-14223-9806d3

Conversation

@jdx

@jdx jdx commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

https://entire.io/gh/jdx/mise/trails/610

On Windows with core.autocrlf=true, mise bootstrap repos status reported every freshly cloned repo as dirty even though git status was clean.

repos apply clones with the user's git config, so files are checked out with CRLF line endings. Every later git call mise made on the repo forced -c core.autocrlf=false, so git compared the CRLF files against LF blobs and saw them all as modified. This removes the override from the repo git helpers (and the printed dry-run command), so checks read the repo under the same config it was cloned with.

Added a unit test that clones with core.autocrlf=true and expects the repo to be current.

Fixes #14223

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.293.

🤖 Generated with Claude Code


Note

Low Risk
Narrow change to bootstrap repo status/cleanliness checks; restores alignment with clone config rather than altering clone or auth behavior.

Overview
Fixes false dirty repo status on Windows (and similar setups) when clones use core.autocrlf=true.

Bootstrap repo git helpers (git_output, git_success, git_run, and dry-run print_git_command) no longer pass -c core.autocrlf=false. Clones follow the user’s git config (often CRLF in the worktree, LF in blobs); forcing autocrlf=false on later git status made every file look modified. Checks now use the repo’s own config, consistent with how the checkout was created.

Adds crlf_checkout_is_not_dirty_with_autocrlf_true, which clones with core.autocrlf=true and asserts RepoState::Current.

Reviewed by Cursor Bugbot for commit 5178e83. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Repository status now correctly reports a CRLF working-tree checkout as current when Git is configured with core.autocrlf=true.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4G4GX0Z4JCRE991ZSDCD8HT
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f645cc4-f945-4088-8ade-96d684b0bd24

📥 Commits

Reviewing files that changed from the base of the PR and between 6be3cbd and 5178e83.


📒 Files selected for processing (1)
  • src/system/repos.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.



📝 Walkthrough

Walkthrough

Git command helpers no longer override the configured core.autocrlf setting. A new test checks that repository status reports Current for a checkout configured with core.autocrlf=true.

Changes

Repository status

Layer / File(s) Summary
Git command configuration and status validation
src/system/repos.rs
The Git helpers and printed commands no longer set core.autocrlf=false. A test checks that status reports Current for a checkout configured with core.autocrlf=true.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium


Merge Risk: ⚪ Minimal · up to 5178e

No actionable issue remains in the supplied change; it is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: preventing freshly cloned repositories from being reported as dirty when using core.autocrlf.
Linked Issues check Passed Issue #14223 requires freshly cloned repositories with core.autocrlf=true to report current. The PR removes the forced core.autocrlf=false setting from git_output, git_success, git_run, an…
Out of Scope Changes check Passed The changes stay within issue #14223. They update bootstrap repository Git helpers, the dry-run command output, and add a focused regression test for CRLF checkout status. No unrelated behavior is cha…


  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jdx
jdx merged commit e9ae41f into main Oct 9, 2026
53 of 55 checks passed
@jdx
jdx deleted the claude/github-issue-14223-9806d3 branch October 9, 2026 11:43
jdx pushed a commit that referenced this pull request Oct 9, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/613
<!-- entire-trail-link-end -->

### 🚀 Features

- **(upgrade)** add tool_update.global_auto to update every global tool
by @jdx in [#14237](#14237)
- reuse downloads the server confirms are unchanged by @jdx in
[#14222](#14222)

### 🐛 Bug Fixes

- **(backend)** stop list() and get() panicking while the tool map
reloads by @jdx in [#14240](#14240)
- **(bootstrap)** stop reporting freshly cloned repos as dirty with
core.autocrlf by @jdx in
[#14225](#14225)
- **(cargo)** lock the same rust homes the rust plugin resolves by
@wislertt in [#14219](#14219)
- **(doctor)** show dotfiles repo and origin when history is disabled by
@jdx in [#14244](#14244)
- **(dotfiles)** replace a junction target when a symlink source changes
by @jdx in [#14226](#14226)
- **(env)** keep backslashes literal in single-quoted dotenv values by
@jdx in [#14228](#14228)
- **(env)** join adjacent quoted and unquoted dotenv value parts again
by @jdx in [#14231](#14231)
- **(history)** describe tracked variant changes by @oppegard in
[#14194](#14194)
- **(lock)** apply aqua version prefixes before selecting overrides by
@nettlesh in [#14218](#14218)
- **(rust)** treat rustup profile aliases like their full names by
@JamBalaya56562 in [#14220](#14220)
- **(schema)** accept task references in a task array by @JamBalaya56562
in [#14229](#14229)
- **(self-update)** keep showing the auto-update hint until it is
disabled by @jdx in [#14233](#14233)

### 🚜 Refactor

- **(lock)** skip aqua prefix ambiguity pass without override prefixes
by @jdx in [#14232](#14232)

### 📚 Documentation

- explain auto_update's release delay and prefer mise settings KEY=VALUE
by @jdx in [#14235](#14235)

### New Contributors

- @wislertt made their first contribution in
[#14219](#14219)
- @oppegard made their first contribution in
[#14194](#14194)
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▄▄▅▆▅▁█ 27,846,447 → 27,968,133 +0.44% 19.61 → 19.48ms -0.67%
hook-env ████▇▁▇ 29,858,357 → 29,992,444 +0.45% 20.72 → 20.58ms -0.68%
ls ▄▇▄██▁█ 32,045,250 → 32,154,808 +0.34% 21.51 → 21.75ms +1.14%
registry ▅▂▃▃▃▁█ 40,197,284 → 40,285,164 +0.22% 17.67 → 18.34ms +3.79%
startup ▁▅█▇▄▁▆ 11,055,760 → 11,093,567 +0.34% 12.17 → 11.95ms -1.77%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

5178e831735e vs 6be3cbdc639a · measured on the runner, not pushed to the history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootstrap repos status reports dirty for freshly cloned repos on Windows (core.autocrlf true)

1 participant