delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/16/03:59:01

X-Spam-Check-By: sourceware.org
Date: Fri, 16 Dec 2005 00:58:52 -0800
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: Patch and Cygwin
Message-ID: <20051216085851.GA2660@efn.org>
References: <SERRANOMu3QTYCrtU2b00000042 AT SERRANO DOT CAM DOT ARTIMI DOT COM> <43A1ACC1 DOT 9090805 AT student DOT lu DOT se> <43A1B2A1 DOT 2020907 AT student DOT lu DOT se> <43A20542 DOT 1050405 AT student DOT lu DOT se>
Mime-Version: 1.0
In-Reply-To: <43A20542.1050405@student.lu.se>
User-Agent: Mutt/1.4.2.1i
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

On Fri, Dec 16, 2005 at 01:07:30AM +0100, Lennart Borgman wrote:
> This is a summary of my tests with Cygwin patch and different line 
> ending styles. (Only LF and CRLF are tested here.)
> 
> I have downloaded patch 2.5.9 from 
> ftp://alpha.gnu.org/gnu/diffutils/patch-2.5.9.tar.gz and compiled it 
> using Cygwin. I have used this patch and the patch that currently comes 
> with Cygwin to do some tests of patch and diff when the files to compare 
> and patch have different line ending styles. I have also made this test 
> using MSYS and GnuWin32 utilities.
> 
> The result is that the only option that seems to be able to handle the 
> mix of line endings is Cygwin using DOS line endings with patch 2.5.9. 
> (The only thing that did not work was preservation of line endings in 
> the patched file, but that seems to be a small problem here.)

I'm not sure the line you are pursuing is going to be a productive one.

While automatically working despite CR-mismatches would be good, I'm
concerned that you'll break other things (patches on files with varying
line endings, patches that are intended to change line endings).

Ideally, patch should exactly follow what diff does, and diff does
treat CRLF vs LF differences as significant, even in a textmount.  The
exception is when specifically requested by the --strip-trailing-cr
option, which makes diff entirely CRLF/LF-blind.  Implementing this
option for patch would be much better than trying to do anything
automatic.

--
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