Make the the GitAttributesLineEndingsPolicy relocatable across machines #621
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.
...and remove
FileSignature
from it completely.The easy way to understand it is this commit: 082f867, which introduces the new policy. The rest of the PR just removes the old one. The only downside is that now, when the line endings property is checked for equality (so on task up-to-dateness), the line-endings of every file in the target is computed and stored into this data structure:
spotless/lib-extra/src/main/java/com/diffplug/spotless/extra/GitAttributesLineEndings.java
Lines 109 to 114 in 758414b
The expensive part of this is iterating over a possibly large target. But we were doing this before anyway, and users can avoid it if they want by using LineEndings.UNIX, and taking on the git battle themselves.