Subject: patch file problem
I could download the patch file like this,
http://support.github.com/discussions/feature-requests/429-download...
but sometimes failed to patch.
I think that linefeed code was translated from CRLF to LF.
Also, there was no linefeed code at the end of the patch file. Only
null code was there in stead.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Tekkub on 24 Oct, 2009 08:17 PM
What link are you trying to download?
3 Posted by unpush on 28 Oct, 2009 04:41 AM
A case of translated linefeed code
The link below is the site to download diff files.
http://github.com/unpush/vimperator-plugins/commit/123376dd2d48de2f...
"123376d" is a child of "1209016".
To checkout the parent, and try to patch.
The "reading.js" uses CRLF linefeed code, but the diff file is translated to LF code.
A case of broken hunk
Refer to the above edit.
http://github.com/unpush/p2-php/commit/a53f83190a841fa9cce57322548a...
"a53f831" is a child of "017519d".
I think there is an unnecessary LF code between first hunk and second hunk in the diff file.
Support Staff 4 Posted by Tekkub on 28 Oct, 2009 11:32 PM
Ah yes, git can be very picky about line endings. Are you on windows or not? At any rate, you should probably set autocrlf in the git config. If you're on windows, you want "true", if you're on mac or linux, you should use "input". We've got a guide to help with lineending issues also.
5 Posted by unpush on 02 Nov, 2009 02:58 PM
Thank you for your quick response. I'm on linux. I normally DO NOT set the "autocrlf", and never had any problem with line endings.
After reading your advice, I tried to set "autocrlf" and used "input", but there was no improvement. Also, I prefer not to convert line endings by git. Furthermore, I would like to control linefeed code depending on different occasion.
I have been using a diff file from git on my linux without any problem. However, I have been unable to make the diff file downloaded from the github work. Therefore, I truly believe that there might be some problems with the diff file form the github. It would be great if you could determine and solve the issue.
Thank you,
Diff file from github does not work.
Diff file from linux's local git have no problem.
Support Staff 6 Posted by Tekkub on 03 Nov, 2009 12:48 AM
Try using .patch in the URL instead. It appears there is a difference between the two URLs, patch being a fully formed git patch, diff being just a simple diff.
7 Posted by unpush on 03 Nov, 2009 09:18 PM
Great!
Thank you for your quick answer and the resolution of the all of the problems!