28 Oct 2002 02:22
[arch-users] Re: networking repositories
Tom Lord <arch-users <at> lists.fifthvision.net>
2002-10-28 01:22:27 GMT
2002-10-28 01:22:27 GMT
I think this belongs on arch-users. -t Date: Sun, 27 Oct 2002 14:50:52 -0800 Cc: rgarciasuarez <at> free.fr, peter <at> pdavis.cx, cmpilato <at> collab.net, alan <at> chandlerfamily.org.uk, dev <at> subversion.tigris.org Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Zack Weinberg <zack <at> codesourcery.com> X-UIDL: #4]"!-/5"!n83"!91-!! 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
RSS Feed