Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Binary file detection via gitattributes not working ?!
Binary file detection via gitattributes not working ?! [message #1823922] Fri, 03 April 2020 21:55 Go to next message
Rice Bauer is currently offline Rice BauerFriend
Messages: 26
Registered: August 2009
Junior Member
Hi,

I got a Windows 10 machine with Eclipse 2020-03 and a .gitattributes with only this line:
* text=auto eol=lf


I also got a binary jpg file that contains a CRLF byte sequence (the file is attached).

When I try to add the jpg to the index in the staging view, CRLF>LF conversion happens, which I can see instantly from the Exception that pops up:
java.io.EOFException: Input did not match supplied length. 1 bytes are missing.


Git for Windows (2.24.0.windows.2) seems to detect the file as binary properly - the file can be added, committed and checkout out again without being modified.

Can anybody confirm this behaviour as undesired?

The FAQs state that the text attribute is supported: https://wiki.eclipse.org/EGit/FAQ

Cheers
Rice
Re: Binary file detection via gitattributes not working ?! [message #1823943 is a reply to message #1823922] Sat, 04 April 2020 10:00 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 397
Registered: August 2016
Senior Member
This is bug 561341. Fix is pending review in Gerrit.

BTW, git < 2.10.0 has the same problem.

[Updated on: Sat, 04 April 2020 10:11]

Report message to a moderator

Re: Binary file detection via gitattributes not working ?! [message #1823960 is a reply to message #1823943] Sat, 04 April 2020 16:47 Go to previous messageGo to next message
Rice Bauer is currently offline Rice BauerFriend
Messages: 26
Registered: August 2009
Junior Member
That is good news, thanks!
Re: Binary file detection via gitattributes not working ?! [message #1827835 is a reply to message #1823960] Mon, 25 May 2020 09:55 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 397
Registered: August 2016
Senior Member
Should be fixed in EGit nightly now. Fix will be in the upcoming EGit 5.8.0 (ETA: 2020-06-17), too.
Previous Topic:Attempt to add cert file to staged changes is ignored
Next Topic:Uexpected CRLF conversion on clone
Goto Forum:
  


Current Time: Tue Jul 27 08:07:08 GMT 2021

Powered by FUDForum. Page generated in 0.01736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top