[p4] Line-ending problems

Ivey, William william_ivey at bmc.com
Mon Feb 26 12:53:08 PST 2007


> -----Original Message-----
> From: Jeff Grills [mailto:jgrills at drivensnow.org]
> 
> Interesting.  I usually use local EOL settings, and then any 
> file that's particular about its line-ending convention I set
> as binary instead so that users/clients can't muck it up. The
> downside to my approach is that you need to pass -t to the diff
> commands to have them perforce text diffs on binary files, but
> that's less common for people to need to do.  I'd rather
> require users remember to use a command line option on a 
> read-only command than forget to set their EOL and mess things
> by submitting a file with bad EOL sequences.

It can still get mucked up in the same way I described earlier.

In any case, 95% of our files need to be unix style and we do use
diff a lot, usually from P4Win, so setting them to binary would be
a pain.

More to the point, they need to appear unix-like even when synced
by Windows clients. Not a good idea to mask the reality of the file
from the develoers, especially since the Windows box may be dealing
with a workspace on unix. That can get confusing. Also, we run
cygwin on Windows and the default there is unix EOLs.

In some cases it doesn't matter which way the EOL falls, but it
does bloat the deltas when every line in a file changes by one
character.

-Wm
 



More information about the perforce-user mailing list