[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: networking repositories

From: Zack Weinberg <zack_at_codesourcery.com>
Date: 2002-10-27 23:50:52 CET

On Sun, Oct 27, 2002 at 02:07:33PM -0800, Tom Lord wrote:
>
>
> That's quite simple, really. If diff(1) generates a patch
> between foo.orig and foo, that have CRLF line endings, patch(1)
> won't apply it to a copy of foo.orig that has LF line
> endings. Hence the diff output is non portable where line
> endings may vary.
>
>
> So, the question is, is there a coherent generalization of diff that
> handles this cleanly, and should it be applied.

It seems to me that patch(1) should just recognize and handle this
situation. The correct behavior is obvious - accept CRLF and LF (and
CR) line endings, apply the transformation preserving the current
line-ending format of the target file. Diffs do not work on binary
files anyway.

You could also consider this a special case of Karl (IIRC)'s
intelligent patch-merging algorithm.

zw

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 27 23:51:49 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.