Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340880 - when FETCH_HEAD is over 4k in size, "File is too large" IOException is thrown
Summary: when FETCH_HEAD is over 4k in size, "File is too large" IOException is thrown
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 0.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.12-M2   Edit
Assignee: Carsten Pfeiffer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 340714 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-24 11:57 EDT by Antonio Gonzalez CLA
Modified: 2013-01-03 20:17 EST (History)
5 users (show)

See Also:


Attachments
Patch to bump up file size buffer (939 bytes, patch)
2011-03-24 12:00 EDT, Antonio Gonzalez CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gonzalez CLA 2011-03-24 11:57:23 EDT
Build Identifier: 20100617-1415

When a git cvsimport is done, FETCH_HEAD may have a lot of entries in it, definitely over the hard coded 4k file size. When the larger file attempts to be loaded, the IOException is thrown, causing problems.

Reproducible: Always

Steps to Reproduce:
1.get a FETCH_HEAD file with lots of entries in it in your git repository. Make the file size > 4096 bytes.
2.Navigate to the git repository in Git Repository viewed in Eclipse
3.Notice the Reference tag section for the repo is red, and check the Eclipse Error log for a "File Size is too Large" IOException
Comment 1 Antonio Gonzalez CLA 2011-03-24 12:00:06 EDT
Created attachment 191839 [details]
Patch to bump up file size buffer

I bumped up the file size from 4096 to 264144. The FETCH_HEAD size that initially caused the problem was 41k in size, so 264k should be plenty for most cvsimport "do not merge" files.
Comment 2 Chris Aniszczyk CLA 2011-03-31 10:52:36 EDT
I recall Shawn doing some work in this area but I can't find the patch on Gerrit... anyways, if you want to contribute your patch you'll have to do it via our Gerrit instance...

http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches

I don't think this is the right solution, but we'll have to wait for Shawn's comments...
Comment 3 Antonio Gonzalez CLA 2011-03-31 11:10:12 EDT
Sounds good. This'll get my camp over the hump in the near future, but you're right there's gotta be a better way. I'm not very familiar with the code or why it's trying to set a max file size but I'd also be happy to take some direction and run with it to help out.
Comment 4 Chris Aniszczyk CLA 2011-04-01 18:40:21 EDT
Here's a patch for review that should help you with your problem...

http://egit.eclipse.org/r/#change,2739

Can you please test it?
Comment 5 Chris Aniszczyk CLA 2011-04-01 21:27:27 EDT
Fixed in master now, 11e2e746c13cc94cabc96e708f3c6a2b159b5995.
Comment 6 Robin Rosenberg CLA 2013-01-03 20:17:08 EST
*** Bug 340714 has been marked as a duplicate of this bug. ***