eclipse-egit / egit

EGit, the git integration of Eclipse IDE

Home Page:https://www.eclipse.org/egit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to disable maximum object size

schrepfler opened this issue · comments

Description

Currently egit has internally hardcoded limits to object size.
This means the TooLargeObjectInPackException is raised when the invoked repository contains larger files. Arguably this is not the way how to use source control but these things do happen.

Caused by: org.eclipse.jgit.errors.TooLargeObjectInPackException: Object too large (2,887,318,710 bytes), rejecting the pack. Max object size limit is 2,147,483,639 bytes.

I believe default limit should be to mimic whatever limit git has and set it to that, and if it's something higher should be raised to the higher value and ultimately it should be possible to disable the check.

Motivation

Repositories with large files are unfortunately a fact of life, especially since hosted git lfs solutions come at a premium many people opt out to host large files in git.

Alternatives considered

As this check is hard coded I don't think there is an alternative, currently I'm delegating clone commands to native git but that means I need to handle security.

Additional context

No response

This limitation is not in EGit but in JGit. JGit's delta handling code requires the target to be a single Java byte array. Any attempt to inflate a delta larger than fits in the 2GiB limit will fail with some form of array index exceptions.
See https://eclipse.gerrithub.io/c/eclipse-jgit/jgit/+/111312