2004-10-29 05:44:56 UTC
between windows and unix. At least, before I found that I could tell
JBuilder to use \n always rather than platform default.
However, the issue is still out there for some people (as seen in the
previous post), and until they notice it, it causes the patching process to
go nuts; mainly a lot of full-file-replaces, and missed opportunities for
merging. And, I just did it to myself again yesterday. ;-)
So, the poll: There are two main camps (I think) on how lines should be
1: All spacing and formatting and control characters are part of the file,
and should not be modified by a revision control program. If it were
modified, it could end up with inconsistent results when copying between
systems and diffing by hand.
2: "ASCII Text" is a protocol which different systems speak differently. It
consists of lines of printable characters which are delimited by
system-specific control characters. A revision control system should use
whatever notion of "text" the host operating system uses, and translate
whenever data comes or goes from the system.
So, whats everyone's opinion? I personally prefer #2, since it prevents
nastiness in my patches, and fixing-line-endings is something that you
expect to deal with when directly copying between diverse systems. (In an
implementation, I would expect that all transmission is done using \n, and
then windows platforms would add \r when applying, and remove it when
patching) I imagine it would be easy to implement, though it would then
probably be requested "optional", and then need a default, and
documentation, and a help entry...