[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] XaAES:update:CONFIGVARS



Petr Stehlik a écrit :
Vincent Rivière píše v Po 31. 08. 2009 v 07:58 +0200:
Since the patch contains the lines you added, the CRs are removed from those
lines, so they are never inserted in the local copy of the maintainers,
neither in CVS.

I do this every time and there is no problem.

If someone has a concrete example of issue with this method, please expose
it here.

On a real operating system where \r is a garbage at end of text line if
you do

cp a b
unix2dos b
diff a b

then you get a diff containing _all_ lines.

You're right, I verified this on both Linux and Cygwin (in directories mounted in binmode).

You don't see that most probably because your diff silently ignores the
\r garbage.

Yes, this happens on Cygwin on directories mounted in textmode. However I usually don't use textmode mounts because some utilities (including the very common cat command) are subtly disturbed.

The real reason why I usually don't see that behaviour is that the sources are originally in UNIX mode, LF only. I change the files either with Notepad++ (which respects the UNIX format and don't insert CR), either with Visual C++ 6 (which adds CR only on inserted lines). So in any case, the end of unmodified lines are never affected, so they are never shown in diffs.

Anyway, the real solution is to apply dos2unix on all sources (both original and modified tree) before running diff.

--
Vincent Rivière