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

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Aug 25 09:56:41 EDT 2010


On Wed, Aug 25, 2010 at 3:28 PM, Brad King <brad.king at kitware.com> wrote:
> 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 client-side has not been updated AFAIK:

$ git fetch origin
$ cd .git/hooks
$ git pull .. remotes/origin/hooks
$ cd ../..

The path 'Utilities/gdcm/Source/DataDictionary/gdcmDefaultDicts.cxx'
has size 1043 KiB, greater than the maximum 1024 KiB.
Run "git config hooks.MaxObjectKiB $KiB" to set local limit, 0 to disable.
The path 'Utilities/gdcm/Source/InformationObjectDefinition/Part3.xml'
has size 2277 KiB, greater than the maximum 1024 KiB.
Run "git config hooks.MaxObjectKiB $KiB" to set local limit, 0 to disable.


>> 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.

Ok that makes perfect sense.

Thanks,
-- 
Mathieu


More information about the Insight-developers mailing list