delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/05/11:20:48

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: <40990637.E2F6FDED@dessent.net>
Date: Wed, 05 May 2004 08:20:23 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: newline in patch command output
References: <20040505125151 DOT GA20299 AT ata DOT cs DOT hacettepe DOT edu DOT tr> <4098F133 DOT FF888288 AT dessent DOT net> <20040505145044 DOT GB20299 AT ata DOT cs DOT hacettepe DOT edu DOT tr>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Baurjan Ismagulov wrote:

> > 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>.
> 
> Wow! How did you locate this message?
> 
> I see it appearing in results for "patch newlines" but not for "patch
> newline" (I use marc.theaimsgroup.com).

I use Google.  I think I started with "site:cygwin.com inurl:ml patch
textmode" and followed a couple of threads.

> So, my only option is having a hacked version of patch that writes with
> CR?

Perhaps running u2d afterwards, dunno...  You might also try building
patch with textmode.o linked in, but I'm not sure if that would do what
you want.

> BTW, I've tried also diffing and patching CR/LF terminated trees in Unix
> mode. Patch failed to apply diff output (it was LF-terminated, IIRC) to
> a CR/LF-terminated tree. Any idea why?

Probably what happened was patch got confused because it saw CRLF line
endings on the target file but just LF in the patch file, and so
couldn't find any common matching context between them.  In the case of
a textmode mount, patch would see LF endings in both the patch and the
target, and so the contexts matched up.

> > Corinna might be able to clarify why this must be so.
> 
> I would greatly appreciate if she does.

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019