Normalize the Windows launcher so a fresh clone is not born dirty - #7
Merged
Conversation
Every clone of this repository reported an immediate uncommitted modification: $ git clone ... && cd aadl-tooling && git status --porcelain M vscode-extension/server/aadl/bin/aadl-standalone.bat The blob was committed with CRLF before .gitattributes existed. The `*.bat text eol=crlf` rule added alongside CI tells Git the index holds LF and to emit CRLF on checkout, so status normalizes the working tree back to LF, compares it against a CRLF index, and reports a permanent difference. Nothing was actually modified. `git add --renormalize` rewrites the index entry as LF, which is what the attribute already assumes. Checkouts still materialize CRLF, so the launcher keeps the line endings cmd.exe needs -- verified in a fresh clone. Found because it made the new -dirty provenance marker useless: a clean CI checkout was recording ls.commit=5a27deea6bd75277524b4da7ecc85fb17d2bf81c-dirty, so the marker fired on every build and stopped distinguishing anything. That is the bug this fixes; the marker itself was working correctly and faithfully reporting what git told it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every clone of this repository reported an immediate uncommitted modification:
Nothing was actually modified. The blob was committed with CRLF before
.gitattributesexisted; the*.bat text eol=crlfrule I added alongside CI tells Git the index holds LF and to emit CRLF on checkout. Sogit statusnormalizes the working tree back to LF, compares it against a CRLF index, and reports a permanent difference.git add --renormalizerewrites the index entry as LF, which is what the attribute already assumed. Checkouts still materialize CRLF, so the launcher keeps the line endingscmd.exeneeds — verified in a fresh clone:How it surfaced
The new
-dirtyprovenance marker from #6 fired on a pristineactions/checkout:Which made the marker useless — it fired on every build and so distinguished nothing. Worth being clear that the marker was working correctly and faithfully reporting what git told it; the defect was in
.gitattributes, which I introduced in #1. This is the kind of thing that only shows up once something starts depending ongit statusbeing meaningful.Also worth noting for anyone who has cloned already: this affected every contributor's
git statusoutput, not just CI.