-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Windows line endings #444
Windows line endings #444
Conversation
Patch on windows requires CRLF. This should leave them unchanged.
Previous version would only look in the root dir which obviously doesn't work.
The previous commits stop git mangling the file endings, but the file endings in the repository were LF, where they should have been CRLF.
Timmmm, first of thanks for the PR. |
I really don't like the idea of changing to CRLF endings in any of the patch files to keep Windows happy. Remember 95% or more of use of Kaldi is on UNIX. I'd prefer to modify the Windows scripts, e.g. to call unix2dos on those files (if that program exists on Windows). |
Apparently there is a way to convert line endings on the Windows command line, but it seems to me that it would be nice to avoid adding an extra step to the installation process. Fortunately in this case the patch I changed ( |
Oh, you're right. I didn't notice that there was 'win' in the filename. On Tue, Jan 12, 2016 at 12:25 AM, Tim notifications@github.com wrote:
|
OK, merging. |
There's an issue with github if you try to download the repository as a zip (rather than cloning it with git), then it runs
git archive
on the repository.Unfortunately they run in on a Linux machine, and git changes all the line endings in text files to their native format (LF on Linux). Patch requires CRLF endings on Windows so it fails.
The change to
.gitattributes
stops git mangling any patch files. The change to the .patch file makes the line endings CRLF. Other files may require changing to CRLF.There's no really nice way to fix this in general, since when
git archive
is run it doesn't know if the target is Windows or Linux, and Windowspatch
always requires CRLF, whereas Linuxpatch
requires the patch file to match whatever it is patching. I'd suggest keeping separate patch files for Windows and Linux (which there is already in this case fortunately).