-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line ending changed after running not-owned test #268
Comments
P.S. This may explain why I get many other test failures using Windows style files. #266 Tools should be robust to line break styles, and preserve what they find. |
Full log from test pass w/ Windows style line endings... Ironically, the log file has Unix style line endings. ;-) For some further irony, it looks like the _ .dest() with custom owner_ tests have been skipped, but somehow they changed the file. |
@BurtHarris I think all of these are related to your |
OK, that sounds good. |
@BurtHarris Could you please try git clone https://github.com/gulpjs/vinyl-fs -b gitattributes and see if your line ending issues go away? Thanks! EDITed: I pasted an ssh remote from my shell, but that's not going to work for you, so changed it to http :-) |
For what it's worth, vinyl-fs the tool (as opposed to vinyl-fs the git repo) doesn't enforce any line ending style. It's just that this fixture is in the repo with unix style |
Yes, that helps, thanks @erikkemperman. After cloning that branch (into a separate directory) the working tree has Unix style line-endings, which avoids this problem, and #263 as well. [It interesting that I can't get the same effect by doing a I'd still suggest that a similar change be made to .editorconfig as part of the fix, that will help to maintain consistency. I had misread the test code and thought it was reading content from the file system rather than from the string constant in test-constants.js. Given how the test is implemented, I agree the code being tested isn't enforcing a particular style. Thanks for taking the time to point that out. There are still a few tests failures on my machine, but I'll detail the current set under Issue #266, most now seem to be related to symlink. |
P.S. I found details on windows-specific git settings that indicate that the |
@BurtHarris It's expected that just updating gitattributes doesn't work, this setting affects the transfer between the client and the remote, which has already been done for an existing clone. That's why I asked you to make a new one. I've adapted the I'll close this issue now, I propose we continue discussion on the others. |
Before running tests, my checked-out copy of
test\fixtures\not-owned\not-owned.txt
has a Windows style line break, and is thus is 14 bytes long. After running the tests, the line break is changed to Unix style, now only 13 bytes long.Git notices the change, but reproducing it may require the
core.autocrlf
setting on windows. A simple test case for this specific behavior might be justified.Does this imply that vinyl-fs is imposing Unix line break conventions on files it outputs? I think that's undesirable.
The text was updated successfully, but these errors were encountered: