I have had a similar problem, as I use Subversion (well, really SVK) to shuttle files between my Linux and Windows machines. In Subversion, you need to set the svn:eol-style properties appropriately because it doesn't handle line ending conversions by default.
If that's what you're using, too, check out SubversionConfigurationForLineEndings
for how to set up a config file to automatically do this for you.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.