Hello Robert,
Ary you sure how slow “slow” might get?
I at least I expect that only the changed lines of a file will get the correct line endings, and all old lines still remain.
And you still will get into merge problems caused by different Line Endings.
But still there is the question, how can we Mac and Unix satisfy when not converting all code?
So still vote for a separate patch.
Regards Britta
Hi,
do we need a separate patch? As far as I understand autocrlf=true will check out files from the central repo converted to the format needed by the client anyway so there should be no merge conflicts resulting out of line endings except for local patches which are not yet committed? My understanding is that with autocrlf=true we will slowly convert the host repository to LF endings with each commit, don’t we?
Greetings, Robert
+1 for the suggestion to use Unix-LF in our Eclipse git repo.
We had some discussions here with the EGit/Gerrit people, and they strongly encouraged us to use LF because it is better supported by all the git tools. Since all the Eclipse tools seem to be fine with core.autocrlf=true I see no objection against that proposal.
I would volunteer to commit that patch.
Cheers,
Michael
I have corrected the link to http://wiki.eclipse.org/Skalli/Contributor_Guide#EOL_properties
Some more details:
If you want to find out about the mode you can use the git bash command: find ./org.* -type f | xargs dos2unix -t -v 2
I have played around with different eclipse editors under windows and our current mixed code (New Line file line delimiter = Windows):
· Target files:
o LDI target: changes all EOL of a file to \r\n when deleting or inserting a new update-site
o Text editor: leaves EOL as they are are
· launch files:
o Eclipse launch edior: converts all EOL to \r\n
· java files
o java editor:
o does not change the EOF when eg. auto formatting the code (mixed mode stay mixed mode)
o new insert lines via keybord-Return the in most cases \r\n EOL from the previous line
o when copying lines it depends ...for source and destination EOL
· pom.xml
o pom editor: dont change the EOL
· xml editor:
o dont change the EOL when saving
o new lines became the same as the surrounding once.
· text editor:
o dont changes the EOL by saving
o new lines became the same as the surrounding once.
o copying of lines depend on the surroundings/what’s copied
· MANIFEST.MF
o with manifest editor:
o does not change the EOL when saving
The creation of new files with “New Line file line delimiter” = Unix does not work for all use cases.
Eg. a creation of a new Plugin-project dose not create all files with only a LF. Eg the Activator.java the .project and the .build had still windows LineEndings.
Creating a new class works correct. So you have to be very careful, when using the option core.autocrlf=false.
Regards Britta
I have found out that we in the Skalli source use the EOF in a strange mixed mode:
Some files contain CRLF (Windows mode) others only LF (Unix mode) and others both mixed.
As we can’t exclude MAC and UNIX user and therefore have to go for only having LF in the GIT Repository.
So I suggest, if there are no doubts, that one of the committers do one big commit doing a Reformatting to LF.