Bug 61609

Summary: TestAttachments on quick-winmail.dat will fail on attachment quick.html due to EOL
Product: POI Reporter: thomas.strauss
Component: HMEFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P2    
Version: 3.17-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description thomas.strauss 2017-10-12 12:51:40 UTC
When building on windows, the quick.html will have different line endings after checkout from GIT. 

The test will then fail because of difference between actual length of quick.html test file and expected length of quick.html attachment in quick-winmail.dat file.
Comment 1 Nick Burch 2017-10-12 22:09:15 UTC
The master copy of our source control is current SVN - https://svn.apache.org/repos/asf/poi/trunk/ . I believe we have appropriate line endings set on the file, but I'm not sure.

Could you try with a svn checkout, and let us know if it's a general Windows issue, or just a problem with the SVN to Git sync?
Comment 2 thomas.strauss 2017-10-13 07:59:42 UTC
I checked with the svn checkout. In svn, the file is correctly set with a property to leave the EOL "as-is".

So, this seems to be a problem of the git bridge on github.

Maybe a hint on the build-with-git part of the website would be helpful, that this test might fail because of the checkout issue.
Comment 3 Dominik Stadler 2017-10-13 09:46:23 UTC
Let's keep it open to check if adding a .gitattribute file can solve this.
Comment 4 Nick Burch 2017-10-13 11:39:02 UTC
Based on https://help.github.com/articles/dealing-with-line-endings/ and https://stackoverflow.com/questions/2517190/how-do-i-force-git-to-use-lf-instead-of-crlf-under-windows it doesn't look like Git supports it on a file-by-file basis the same way SVN does. However, assuming we've been consistent everywhere, it looks like a .gitattributes file may let us get something close
Comment 5 Dominik Stadler 2018-01-01 14:53:43 UTC
We added a .gitattribute file with r1819771 that should make the file use just lf always.