I have verified this behavior by means of a new pull request …
What we should do then is to document the fact that all files use CRLF in the repo and that developers should consider this when setting up their local development
environment and e.g. configure Git to not do automatic CRLF conversion when running on Windows …
However, I wonder why I did not run into this problem before when working on Scandium and Californium. Julien, you seem to develop on Linux/Unix, did you need
to explicitly configure your local Git or eclipse or whatever you work with to support the CRLF eol delimiters correctly?
Kai
Von: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx]
Im Auftrag von Kovatsch Matthias
Gesendet: Donnerstag, 16. Oktober 2014 15:44
An: Californium (Cf) developer discussions
Betreff: Re: [cf-dev] Strange behaviour on pull request for element-connector
Unfortunately, I must inform you guys that basically the whole code base uses CRLF. The reasoning behind this is that no editor has problems handling CRLF,
but quite some have with handling and displaying LF correctly. Since this should be handled automatically from the metadata in the future, I do not see the need to convert now to any specific line ending.
Is the “mvn eclipse:eclipse” step by now integrated into the Eclipse import function? The Git support in Eclipse became quite nice and initially most people
used “Import/From Git” to get started with Californium. The detour over the console might be normal for corporate guys, who are forced to use Maven (:P), but it is a major show-stopper for beginners. Yet Californium always was meant to have a low entry-barrier.
I see the problems we get now with an increasing number of contributors, but I still would like to have it as convenient as possible, that is, having virtually no need for documentation on how to run and edit the code.
Ciao
Matthias
+1 we all know it's windows the anomaly ;)
On Thu, Oct 16, 2014 at 2:55 PM, Hudalla Kai <Kai.Hudalla@xxxxxxxxxxxx> wrote:
I’d also prefer that approach. It provides support for people that want to use eclipse for editing
but prevents the hassle of having to commit/revert changes made to the .profile file by eclipse during its normal operation (there are certain activities that seem to trigger a change of that file).
BTW I have taken a deeper look into my original problem and it seems to be related to inconsistent
eol usage within the repo, i.e. it looks like some people commit code using CRLF as eol delimiter while others commit using LF as eol. In my case it seems like the pom.xml has been commited using CRLF and my pull request would now change that back to plain
LF.
Do we have a policy for using either CRLF only, LF only or anything you want? My suggestion would
be to define LF as the preferred eol delimiter and advise people who want to use e.g. eclipse on Windows to use “git config –global core.autocrlf true” to make sure, all eols are converted to/from LF when pushing/fetching …
Mit freundlichen Grüßen / Best regards
Kai Hudalla
INST/ESY
Mobile:
+49 (151) 54336335
Phone:
+49 (30) 726112-159
Von:
cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx]
Im Auftrag von Julien Vermillard
Gesendet: Donnerstag, 16. Oktober 2014 14:05
An: Californium (Cf) developer discussions
Betreff: Re: [cf-dev] Strange behaviour on pull request for element-connector
on leshan we enforce it using "mvn eclipse:eclipse"
when you run it it create the whole project configuration (formatter, unix end-of-lines,etc..) for all the sub-projects.
On Thu, Oct 16, 2014 at 10:56 AM, Kovatsch Matthias <kovatsch@xxxxxxxxxxx> wrote:
Yes, this is quite inconvenient and why I liked having the .settings also in the repository... Is there a good way to include the line endings (Windows) and the code formatter (Eclipse
default Java formatter)?
I hope at least the Eclipse IDE takes the encoding from the POM.
Ciao
Matthias
________________________________
From: cf-dev-bounces@xxxxxxxxxxx [cf-dev-bounces@xxxxxxxxxxx] on behalf of Hudalla Kai [Kai.Hudalla@xxxxxxxxxxxx]
Sent: Thursday, October 16, 2014 10:38 AM
To: Californium (Cf) developer discussions
Subject: Re: [cf-dev] Strange behaviour on pull request for element-connector
Thanks for the hint, Julien. You seem to be right, when I do a “git diff –b origin/master pom.xml” I see that only the actually changed lines are part of the diff :)
I will need to check out why the whitespaces are tampered with in my eclipse workspace …
Kai
Von: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] Im Auftrag von Julien Vermillard
Gesendet: Donnerstag, 16. Oktober 2014 09:44
An: Californium (Cf) developer discussions
Betreff: Re: [cf-dev] Strange behaviour on pull request for element-connector
I would bet on end-of-line change (unix vs windows) or tab/space reformating
try "git diff -b"
--
Julien Vermillard ::::
http://people.apache.org/~jvermillard/
On Thu, Oct 16, 2014 at 8:49 AM, Hudalla Kai <Kai.Hudalla@xxxxxxxxxxxx<mailto:Kai.Hudalla@xxxxxxxxxxxx>> wrote:
Guys,
I have run into some strange behavior while trying to turn element-connector into an OSGi bundle. In order to do so I added the Maven Bundle Plugin to the POM file (addition of some 10 lines). I then pushed the changes to my repo on GitHub and tried to prepare
the pull request to the eclipse.element-connector repo. However, when I take a look at the pre-view of the pull request, the diff for the POM file indicates that it will be replaced completely, i.e. not only the new lines are added but instead all existing
lines will be removed and be replaced by the content of the POM from my repo. I suspect this to be somehow connected to Git not properly handling this file as a text file but instead considering it to be a binary file. The same holds true for a change I’d
like to make to the RawDataChannel.java file (remove obsolete and obviously erroneous imports) …
Any ideas what the problem might be?
Regards,
Kai
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx<mailto:cf-dev@xxxxxxxxxxx>
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev
|