Repository navigation
fix: line-ending rules in .gitattributes work with upstream's own rules - #239
Merged
Merged
Conversation
…ules - The rule is now `-text -eol`. Upstream's own `text` wins over the parent's `-text`, so the parent's `eol` still applied. - A file gets no rule when the parent's attributes do not change it. - A pull does not add a rule again. An old `-text` rule becomes the new one. Fixes #231
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #239 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 51 51
Lines 3481 3508 +27
=========================================
+ Hits 3481 3508 +27
|
|
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.



What this changes
The rules that keep a nested repo's files as upstream has them:
-text -eol. A nested repo's owntext(for example* text=auto) wins over the parent's-text. The parent'seol=crlfthen still applied.textandeolattributes with those of upstream alone.-textrule for the same file becomes-text -eol.Why
The rules had no effect when the nested repo has its own
.gitattributes, were added for files that were already correct, and repeated on each pull.Fixes #231
Checklist
uv run poe allpasses (ruff, mypy, pyright, bandit, complexipy, and thetests at 100% coverage)
--help/ the man page updated, if the change is visible to users