X-Spam-Check-By: sourceware.org Date: Fri, 16 Dec 2005 00:58:52 -0800 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: Re: Patch and Cygwin Message-ID: <20051216085851.GA2660@efn.org> References: <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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/