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.
Description
The .gitattributes file says
/src/init/ text eol=lf
, which applies thetext eol=lf
only to the directory, not to the files in the directory.(no output)
By changing the rule to
/src/init/* text eol=lf
, it is applied to all files within the directory instead.Motivation and Context
Closes #3099
How Has This Been Tested?
I don't actually have zsh on Windows, but I can see the problem using xxd.
Before:
(note the 0d 0a sequence at the end)
After changing .gitattributes and doing a clean checkout of the init directory:
(now it's 0a 0a. The second 0a was introduced two weeks ago. The before test was with the release version so the second line feed was not present.)
Since this also applies to starship.ps1 I checked on Windows PowerShell 5.1 and PowerShell 7.1 (on Windows) and neither seem to care about the missing carriage returns.
On Linux and OS X, I expect the files have always had LF line endings and this change has no impact because that's the default behavior when checking out Git repositories on non-Windows build machines.
Checklist: