Skip to content

fix: normalize CRLF to LF when hashing embed files - #41

Merged
ptsouchlos merged 1 commit into
mainfrom
fix/crlf-normalize-hash
Jul 15, 2026
Merged

fix: normalize CRLF to LF when hashing embed files#41
ptsouchlos merged 1 commit into
mainfrom
fix/crlf-normalize-hash

Conversation

@ptsouchlos

@ptsouchlos ptsouchlos commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Windows checkouts convert LF to CRLF by default, which made embd status report false drift for embeds whose lock file was built on a platform that didn't convert line endings.

This PR changes embd to hash text files with CRLF normalized to LF, matching git's own core.autocrlf semantics. Binary files are hashed byte-for-byte.

Fixes #40

@ptsouchlos
ptsouchlos force-pushed the fix/crlf-normalize-hash branch from e454895 to 999f2e6 Compare July 15, 2026 03:08
Windows checkouts convert LF to CRLF by default, which made embd
status report false drift for embeds whose lock file was built on a
platform that didn't convert line endings. Hash text files with CRLF
normalized to LF, matching git. Binary files are unaffected.
@ptsouchlos
ptsouchlos force-pushed the fix/crlf-normalize-hash branch from 999f2e6 to dca4d81 Compare July 15, 2026 03:12
@ptsouchlos
ptsouchlos merged commit ab509cf into main Jul 15, 2026
56 checks passed
@ptsouchlos
ptsouchlos deleted the fix/crlf-normalize-hash branch July 15, 2026 19:10
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.

[BUG] CRLF inconsistencies across OSes results in false positives for embd status

1 participant