Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: AdiShavit on July 29, 2010, 02:45:24 pm
-
Hi,
Is there a way to get C::B to save its config files (.workspace, .layout, .cbp) using CRLF for line breaks and not LF?
Thanks,
Adi
-
This topic is near exactly 2 years old but I would like to have this feature too.
Git always complains that the .cbp file is LF ending and that it will have to convert it internally to CR-LF (along with the .layout and .workspace but I don't track them).
I think I could do something with the "auto-crlf" configuration in Git but changing the Codeblocks way of encoding its projects files seems easy... maybe it isn't ?
Using 8024 on Win7 64bits
-
This topic is near exactly 2 years old but I would like to have this feature too.
Git always complains that the .cbp file is LF ending and that it will have to convert it internally to CR-LF (along with the .layout and .workspace but I don't track them).
I think I could do something with the "auto-crlf" configuration in Git but changing the Codeblocks way of encoding its projects files seems easy... maybe it isn't ?
Using 8059 on Win7 64bits
Fix your GIT Settings; I have never used GIT; but, Google gives directions.
https://help.github.com/articles/dealing-with-line-endings (https://help.github.com/articles/dealing-with-line-endings)
Tim S.
-
That's what I did but really I don't understand what's happening. It's said that Git use LF internally so why would it have to do any conversion to a LF file ?
My autocrlf option is set to "true", which means "that Git will process all text files and make sure that CRLF is replaced with LF when writing that file to the object database and turn all LF back into CRLF when writing out into the working directory. This is the recommended setting on Windows because it ensures that your repository can be used on other platforms while retaining CRLF in your working directory."
Anyway I just added "*.cbp eol=lf" in the global .gitattributes file and the warning doesn't appears anymore.
In the end, is there a good reason for Codeblocks to have only LF in the projects files ? It could avoid having to deal with these stupids LF/CRLF problems at least on Windows
-
FYI:
The reason is here: Re: Issue about saving the cbp project file (http://forums.codeblocks.org/index.php/topic,15904.msg124446/topicseen.html#msg124446), I think it should be fixed. :)