[Insight-developers] GIT : hook declined: size 1435 KB, greater than the maximum 1024 KB

Brad King brad.king at kitware.com
Wed Aug 25 09:28:18 EDT 2010


On 08/25/2010 06:39 AM, David Cole wrote:
> Could we go so far as to adjust the hook such that if the object looks
> "text-ish" that there is no size limit...?
> 
> Is that possible?

I've taught the server-side hook to have custom limits on a per-type
basis.  Now .c files can be up to 3MB and .cxx files can be up to 2MB.
If this still proves too limiting we can make the limits bigger for
specific file types while still enforcing it overall.

> The reason for the size limit is to prevent arbitrarily large, largely
> incompressible *binary* objects from getting into the git objects
> database, but the only people who have run into it so far are simply
> trying to commit the first version of a very large text file. (Usually
> one that they didn't write, and usually for a file that will not be
> heavily modified moving forward anyhow, to the best of our ability to
> predict the future....)

I choose to be very conservative here.  While converting history from
CVS I removed several very large files (like a PowerPoint presentation
full of large images) that should never have been committed.  Back in
the CVS days such large files could be simply "cvs rm"-ed to prevent
developers from having to download them on checkout.  Now with Git once
they are in history they are there forever and everyone will always
have to download them.  It is better to prevent them from being added
in the first place.

-Brad


More information about the Insight-developers mailing list