mirror of
https://github.com/horizon-rust/horizon-mixins.git
synced 2026-12-03 19:34:02 +07:00
[PR #4] [MERGED] Check out text files with LF on every platform #13
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
horizon-rust/horizon-mixins#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/horizon-rust/horizon-mixins/pull/4
Author: @d3grando
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154
Base:
main← Head:gitattributes-lf📝 Commits (1)
b93a2cfCheck out text files with LF on every platform📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
➕
.gitattributes(+4 -0)📄 Description
What and why
Follow-up to #3, where I offered this. Git for Windows defaults to
core.autocrlf=true, so a plaingit cloneonWindows checks out every fixture and snapshot with CRLF. The tests compare generated output byte for byte against
tests/snapshots/*, or search fixture files for multi-line\nstrings, so 7 tests fail on such a checkout for lineendings alone. This adds a
.gitattributes:so text files check out with LF on every platform, whatever
core.autocrlfsays.text=autostill leaves binary filesalone (the repo has none today).
No committed file changes: every tracked text file is already LF in the index, and
git add --renormalize .afteradding the file reports nothing to stage. The two empty fixtures (
fixtures/cycle/{a,b}/src/lib.rs) stay empty.Testing
Fresh clones made with
git -c core.autocrlf=true cloneon Windows 11, toolchain 1.95.0 fromrust-toolchain.toml(MSVC),
cargo test --workspace --locked --no-fail-fast, each clone with its ownCARGO_TARGET_DIR:main(fb60016)The 7 that this fixes:
canonical_plan_and_source_snapshots_ignore_discovery_orderadvanced::advanced_source_and_plan_snapshots_ignore_discovery_ordereffects::effects_snapshots_and_discovery_order_are_deterministicscoped::scoped_source_plan_and_bridge_snapshots_ignore_discovery_orderboundary::head_preserves_lifetime_methods_closures_question_mark_and_dropexact_revision_pin_is_checkedscoped::captures_reject_missing_shadowed_out_of_scope_and_unsupported_bindingsThe 6 that still fail, on both checkouts, are Windows-only and not about line endings: the 5 listed in #3
(
E_INVALID_PATHfor--workspacein two tests,E_ATOMIC_STAGEin two,E_STAGE_OWNERSHIPin one). The sixth isboundary::public_support_module_is_callable_from_a_hook_in_a_dependent_crate, added since #3, which also stops atE_ATOMIC_STAGE("atomic replacement of an existing stage currently requires Linux").On Linux and macOS nothing changes: their checkouts were already LF.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.