Jump to content

^M unchanged code


Guest xeross155
 Share

Recommended Posts

Hey,

I keep having the following outputs in my diffs

-  PosSection = InStr(1, INIContents, "[" & Section & "]", vbTextCompare)
+  PosSection = InStr(1, INIContents, "[" & section & "]", vbTextCompare)^M

I haven't touched these lines but somehow they get the ^M at the end. I got told they are DOS line endings but my files (In this project) use them by default. Will these changes show up in my commits and how do I prevent em ?

Regards, Xeross

Link to comment
Share on other sites

about file endings:

\\r (0x0D) is on Mac

\\n (0x0A) on Linux

\\r\\n (0x0D 0x0A) on Windows

the "^M", which you see, is the \\r which gets added on windows systems.

you should be able to use this config setting in .git/config to change the behavior (play around with it, i don't know if you'll have to set it to true or false):

[core]

autocrlf = false

Link to comment
Share on other sites

With msysgit using autocrlf=true, all CRLFs should be converted to LFs in the repo. Ie. you'll still see CRLFs in the working tree, but only LFs will be in the object database (and thus only LFs gets distributed).

(from my own little experience with msysgit on winXP, remote repo had all LFs, my working tree had all CRLFs, patch application may screw this a bit, though)

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use