delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <CA+sc5mkWc-CE3bgX8=QDJpOS-bHXPdYJNeUgMNJhhSDugFvufw@mail.gmail.com> |
References: | <CAGCLmzztLn88uAcD5RzZAyYoPv8mLd0-Kx9gntmbdSObkG44Gg AT mail DOT gmail DOT com> <CA+sc5mkWc-CE3bgX8=QDJpOS-bHXPdYJNeUgMNJhhSDugFvufw AT mail DOT gmail DOT com> |
Date: | Thu, 8 Nov 2012 16:15:05 +0100 |
Message-ID: | <CAGCLmzw+uS285fwJG+92XtTQa=cRK1EpVaFO9c_o+c_pU4sHEQ@mail.gmail.com> |
Subject: | Re: Info for the item "does patch.exe work different than other unx patch tools?" (i.e. "hunk 1 out of 3 hunks failed") |
From: | =?ISO-8859-1?Q?Thomas_H=F6henleitner?= <thomas AT seerose DOT net> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id qA8FFKDL014124 |
Thanks a lot, Earnie, for your answer. I do not know whitch patch command line switch do you mean. With -l I had already tried. In my answer to Ryan follows an example, I created. Bes regards, Thomas 2012/11/8 Earnie Boyd <earnie AT users DOT sourceforge DOT net>: > On Thu, Nov 8, 2012 at 5:30 AM, Thomas Höhenleitner wrote: > >> >> So now I had a closer look to the diff generated my.patch file and I >> found out, that the file had somehow hybrid line endings: >> * the header with the file names was unix-like >> * the body with the diff info was dos-like >> >> The reason probably is, that my sources are with dos-like line >> endings. I assume, diff starts creating the my.patch with unix-like >> line-endings and than adds the diff info as it is. >> > > Possibly. Maybe your new file has the CRLF and the old file has only LF. > >> Than, when patch.exe gets the my.patch to execute it it sees unix-like >> line endings at the beginning of the my.patch, assumes all is that way >> and gets later trouble applying the patch info. >> > > That depends. If the patch executable has the file modes in _O_TEXT > then it will be capable of reading the mixed line endings fine. If > the patch executable has the file modes in _O_BINARY then it will read > the patch file in binary mode receiving the CR as part of the patched > line. > >> I do not regard this as a bug, but I guess I am not the only one >> spending a few hours with that issue. >> > > It is not a bug, that is correct. > >> I would like to propose an additional command line switch for the >> Cygwin diff.exe and/or patch.exe to tell about the line-endings. > > If you use the --help argument to patch, you'll find one already that fits. > > -- > Earnie > -- https://sites.google.com/site/earnieboyd > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |