Skip to content

Normalize the Windows launcher so a fresh clone is not born dirty - #7

Merged
lwrage merged 1 commit into
mainfrom
fix-gitattributes-renormalize
Sep 2, 2026
Merged

Normalize the Windows launcher so a fresh clone is not born dirty#7
lwrage merged 1 commit into
mainfrom
fix-gitattributes-renormalize

Conversation

@lwrage

@lwrage lwrage commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Every clone of this repository reported an immediate uncommitted modification:

$ git clone https://github.com/osate/aadl-tooling.git && cd aadl-tooling
$ git status --porcelain
 M vscode-extension/server/aadl/bin/aadl-standalone.bat

Nothing was actually modified. The blob was committed with CRLF before .gitattributes existed; the *.bat text eol=crlf rule I added alongside CI tells Git the index holds LF and to emit CRLF on checkout. So git status normalizes the working tree back to LF, compares it against a CRLF index, and reports a permanent difference.

git add --renormalize rewrites the index entry as LF, which is what the attribute already assumed. Checkouts still materialize CRLF, so the launcher keeps the line endings cmd.exe needs — verified in a fresh clone:

CLEAN (fixed)
launcher line endings: DOS batch file text, ASCII text, with CRLF line terminators

How it surfaced

The new -dirty provenance marker from #6 fired on a pristine actions/checkout:

warning: packaging a CLI built from a dirty tree
  (ls.commit=5a27deea6bd75277524b4da7ecc85fb17d2bf81c-dirty)
  language server 0.1.0.v20260902-1520 (5a27dee...-dirty)
  OSATE           2.19.0.vfinal (425614884eaf14312141fbdd3a393ba54ff34b23)

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 on git status being meaningful.

Also worth noting for anyone who has cloned already: this affected every contributor's git status output, not just CI.

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.
@lwrage
lwrage merged commit dc95586 into main Sep 2, 2026
3 checks passed
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.

2 participants