Bug 21437 - MonoDevelop does not obey line-ending conventions in .gitattributes
Summary: MonoDevelop does not obey line-ending conventions in .gitattributes
Status: RESOLVED DUPLICATE of bug 3675
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 5.1
Hardware: PC Windows
: --- normal
Target Milestone: master
Assignee: Marius Ungureanu
Depends on:
Reported: 2014-07-18 09:35 UTC by David Naylor
Modified: 2014-07-18 10:14 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description David Naylor 2014-07-18 09:35:27 UTC
I have a git repository that is normalised to LF line endings and I have the following:

<file name=".gitattributes">
# Attempt auto-detection of text files, as a fail-safe measure.                 
* test=auto                                                                     
# Normal text files with conversion for CRLF to LF.                             
*.bat text                                                                      
*.cs text merge=csharp                                                          
*.csproj text merge=union                                                       
*.resx text                                                                     
*.sh test                                                                       
*.sln text eol=crlf merge=union                                                 
*.xml text merge=union                                                          
# Binary files that should not be converted                                     
*.xls binary                                                                    
*.xlsb binary                                                                   
*.xlsm binary                                                                   
*.xlsx binary                                                                   

however MonoDevelop does not convert the checked out files to CRLF line endings on Windows - instead keeping the line endings LF.  

MonoDevelop also fails to convert text file's CRLF line endings back to LF on commit (resulting on a diff with the entire document deleted and added back with different line endings - instead of just showing the change).  

I have verified that msysgit does behave as expected (and that core.autocrlf is NOT set).
Comment 1 Marius Ungureanu 2014-07-18 10:08:36 UTC
This is a known issue. It will be fixed when we switch to libgit2sharp as our git provider.
Comment 2 Marius Ungureanu 2014-07-18 10:14:03 UTC

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