Skip to content

Fix CHANGELOG.md: restore CRLF after an accidental LF renormalize (#2694 fallout) - #2696

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/changelog-crlf-restore
Aug 30, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
fix/changelog-crlf-restore

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

What

My own merge-conflict resolution while landing #2694 (merging origin/dev's #2693 into my branch) committed the resolved CHANGELOG.md without the .git/info/attributes CHANGELOG.md -text override in place — the standard trap this repo's CHANGELOG workflow requires guarding against. Git silently renormalized the entire file to LF on staging, and that landed on dev via #2694's merge commit.

Fix

Rebuilt the file with CRLF on every line. Verified via a CR-stripped diff against the current dev content that this is byte-identical modulo line endings — no textual content changed, only the line-ending restoration.

No build/test impact (a .md file, not compiled).

🤖 Generated with Claude Code

)

My merge-conflict resolution in #2694 (merging origin/dev's #2693 wraparound
fix into my collection-health branch) committed without the .git/info/attributes
CHANGELOG.md -text override in place, so git silently renormalized the WHOLE
file to LF on staging. Content is byte-identical to what merged (verified with
a CR-stripped diff); only line endings are restored to the CRLF this file has
always used.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@claude

claude Bot commented Aug 30, 2026

Copy link
Copy Markdown

Reviewed. This is a doc-only, single-file change (CHANGELOG.md), so the T-SQL style rules, Lite/Darling parity, and security/performance concerns don't apply here — but I verified the core claim in the PR description rather than taking it on faith:

  • Extracted the pre-image (3057 removed lines) and post-image (3057 added lines) from the diff, stripped the diff marker and any \r, and hashed both sequences independently → identical MD5 (54fb9759c936570a86cd7ba90780672b). Confirms this is byte-identical modulo line endings, positionally, for every line — not just "looks the same."
  • Confirmed the direction: the removed lines have bare \n, the added lines have \r\n (verified with cat -A). So this restores CRLF, matching the stated intent, not the reverse.
  • .gitattributes already sets * text=auto eol=crlf. The PR description says the actual guard that failed was an unversioned .git/info/attributes entry (CHANGELOG.md -text) — i.e., the safeguard against this recurring lives only in the maintainer's local git config, not in the repository.

Given that, one process suggestion (non-blocking, since this PR itself is a correct, minimal fix):

Nothing in-repo currently prevents this from happening again — no CI check verifies CHANGELOG.md's line endings, and the local-only .git/info/attributes override that's supposed to prevent it isn't documented anywhere in CONTRIBUTING.md or committed as repo config. Since the PR body calls this "the standard trap this repo's CHANGELOG workflow requires guarding against," it might be worth either (a) adding a cheap CI grep/lint step that fails if CHANGELOG.md contains a bare \n not preceded by \r, or (b) documenting the local .git/info/attributes requirement in CONTRIBUTING.md so it isn't tribal knowledge. Otherwise this exact fallout is likely to recur on the next merge-conflict resolution.

No functional/security/performance issues found.

@erikdarlingdata
erikdarlingdata merged commit 0b2b8b7 into dev Aug 30, 2026
6 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/changelog-crlf-restore branch August 30, 2026 13:58
pull Bot pushed a commit to ehtick/PerformanceMonitor that referenced this pull request Sep 10, 2026
…ze (erikdarlingdata#2695 fallout)

PR erikdarlingdata#2695's own merge-conflict resolution (commit 9a33208, merging origin/dev to
resolve a CHANGELOG collision with erikdarlingdata#2694) renormalized the whole file to LF again,
the same trap erikdarlingdata#2696 had just fixed for erikdarlingdata#2694 earlier today. Confirmed by bisecting:
0b2b8b7 (the erikdarlingdata#2696 fix) was 3057/3057 CRLF; 9a33208 was 0/3059 CRLF.

Rebuilt from the raw stored blob (confirmed 0 pre-existing CR bytes, so the LF->CRLF
conversion is lossless) with the .git/info/attributes -text override in place so the
commit isn't re-normalized on the way in.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant