Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] line ending conversion

I'd like to figure out a way to avoid this problem going forward.  

With core.autocrlf=true, command-line Git will convert line endings to the platform default (for me that's Windows) when checking out, and to LF newlines when committing. 

This problem we're experiencing might be caused by using a combination of EGit and command-line Git.  Currently I use EGit to commit since it does a great job (prefills the commit comment) but prefer to use command-line git for push/pull, and occastionally checkout.  

With a setting of core.autocrlf=true, command-line Git should convert line endings to platform default when checking out, pulling etc., but if this setting is ignored by EGit, committing with EGit would be problematic.  I've got workspace line endings set to "Unix" in my preferences, but I doubt that would solve the problem with autocrlf turned on.

To solve this problem would it be sufficient to:
* set core.autocrlf=input on Windows, 
* have Eclipse workspace settings setup to use Unix line endings (if using non-Eclipse file editors, setup those to use Unix line endings too)
* commit within Eclipse using EGit
Existing Git working directories might need to be checked out again with this new setting

David

On Thu, Nov 24, 2011 at 9:55 AM, Steffen Pingel <steffen.pingel@xxxxxxxxxxx> wrote:
As far as I understand, EGit does not respect this setting and hence you will end up with Windows line endings when committing new files.

I'll run the conversion over the Mylyn Docs repository later today.

Steffen


On Thu, Nov 24, 2011 at 6:49 PM, David Green <david.green@xxxxxxxxxxx> wrote:
Steffen,

If you're inclined feel free to go ahead with a line ending fix for Mylyn Docs as well.  If this line ending problem is coming up within Mylyn Docs I'd like to hear about it, because as far as I know I've setup my Git environment correctly based on these recommendations: http://help.github.com/line-endings/ though I haven't checked to be sure that EGit respects these settings correctly.

David 

On Thu, Nov 24, 2011 at 5:22 AM, Steffen Pingel <steffen.pingel@xxxxxxxxxxx> wrote:
Hi committers,

since the move to Git a few of the new files that were created were
checked in with Windows line endings due to limitations of the git
tooling. This causes some inconsistencies and weird rendering in EGit.

To fix this I have converted all files to Unix line endings and set
Unix line endings as the default for all projects following the
Eclipse project conventions:
http://wiki.eclipse.org/Platform-releng/Git_Workflows#Dealing_with_line_terminators.
A few more details can be found here:

 356790: configure all projects for Unix file endings
 https://bugs.eclipse.org/bugs/show_bug.cgi?id=356790

(I excluded org.eclipse.mylyn.docs and some pathes in
org.eclipse.mylyn.reviews from the conversion to wait for feedback
from affected committers first.)

Please make sure that files committed in the future use Unix line
endings only (configuration hints are on the Wiki page).

Thanks,

Steffen

--
Steffen Pingel
Senior Software Developer, Eclipse Mylyn
Mylyn Tasks Lead
http://tasktop.com
_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev



--
David Green
VP of Engineering, Tasktop
Committer, Eclipse Mylyn



_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev




--
Steffen Pingel
Senior Software Developer, Eclipse Mylyn
Mylyn Tasks Lead
http://tasktop.com


_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev




--
David Green
VP of Engineering, Tasktop
Committer, Eclipse Mylyn
http://tasktop.com 
+1-778-588-6896 ext. 115



Back to the top