delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Message-ID: | <4098F133.FF888288@dessent.net> |
Date: | Wed, 05 May 2004 06:50:43 -0700 |
From: | Brian Dessent <brian AT dessent DOT net> |
Organization: | My own little world... |
MIME-Version: | 1.0 |
To: | cygwin AT sources DOT redhat DOT com |
Subject: | Re: newline in patch command output |
References: | <20040505125151 DOT GA20299 AT ata DOT cs DOT hacettepe DOT edu DOT tr> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Baurjan Ismagulov wrote: > > Hello, > > I wish to use diff and patch on files with CR/LF newlines. I've > installed cygwin with DOS text file type. Diff produced a patch with > CR/LF. When I try to apply this patch, the modified files contain only > LF, and I have to run unix2dos on them. How can I make patch produce > output files with CR/LF in DOS mode? > > I've tried to search this in google and list archives, but "patch" > brought too many false hits :( . patch is a tricky area in terms of line-endings. This is mostly explained in <http://www.cygwin.com/ml/cygwin/2003-03/msg00492.html>. Patch can read in either binmode or textmode (depending on the mount and presense of --binary) but it always writes its output in binmode, which is what causes your CRs to go away. Corinna might be able to clarify why this must be so. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |