Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320519

Summary: JGit Ignore core.autocrlf Config
Product: [Technology] JGit Reporter: Ian Dees <ian.dees>
Component: JGitAssignee: Project Inbox <egit.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: mn, robin.rosenberg
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:

Description Ian Dees CLA 2010-07-21 11:21:47 EDT
Build Identifier: M20100211-1343

In workplaces that have developers on Windows and Linux platforms, the core.autocrlf config must be used so that Windows users do not check in text files with CRLF line endings.

EGit/JGit ignores the setting and does not modify the file before committing the change.

See also:
- http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
- http://help.github.com/dealing-with-lineendings/

Reproducible: Always

Steps to Reproduce:
1. On Windows, set the autocrlf config: git config --global core.autocrlf true 
2. Create a file using notepad.exe with a single line.
3. Add and commit the file with the git command line.
4. Open the file and edit with eclipse.exe, adding another line.
5. Add and commit the file with the egit plugin.
6. Pull the repo to a Linux box and see that the file has CRLF line endings.
Comment 1 Robin Rosenberg CLA 2010-08-19 17:13:50 EDT

*** This bug has been marked as a duplicate of bug 301775 ***