Add .gitattributes to pin line endings to LF - #49
Merged
Merged
Conversation
This repository is already uniformly LF, so `git add --renormalize .` is a no-op here -- this is purely preventive. Without a .gitattributes, the stored form of each file depends on whichever contributor's core.autocrlf setting happened to commit it, which is how the sister repository DatabentoBinaryEncoding.jl drifted into a CRLF/LF mix. `* text=auto` makes LF canonical in the repository regardless of local git config. Working trees may still use CRLF on Windows. The binary patterns are listed ahead of need: this package writes .dbn and .dbn.zst captures, and any fixture added later should be exempt from EOL conversion by rule rather than by git's NUL-byte heuristic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Why
Without a
.gitattributes, the stored line endings of each file depend on whichever contributor'score.autocrlfsetting happened to commit it. That's how the sister repo DatabentoBinaryEncoding.jl drifted into a mix — 23.jlfiles stored CRLF vs 20 LF, with even its two CI workflows split one each way — which silently turned a 1-line change into 93 lines of churn while preparing its v0.1.7 release (fixed in tbeason/DatabentoBinaryEncoding.jl#50).This repository is already uniformly LF, so
git add --renormalize .is a no-op here. This PR is purely preventive: it pins the invariant before it can drift.What
* text=auto— LF becomes the canonical stored form for all detected text, independent of local git config. Working trees may still use CRLF on Windows.*.dbn/*.dbz/*.zst/*.frag→binary, listed ahead of need. This package writes.dbnand.dbn.zstcaptures viastream_to_file, and any fixture added later should be exempt from EOL conversion by rule rather than by git's NUL-byte content heuristic.No
.git-blame-ignore-revshere, unlike the DBN PR — there's no renormalization commit to ignore.Diff
One new file, 13 lines. No existing file is modified.
🤖 Generated with Claude Code