From: Junio C Hamano Date: Tue, 24 May 2011 00:18:48 GMT Subject: Re: [PATCHv4 09/10] pack-objects: Estimate pack size; abort early if pack size limit is exceeded Message-ID: <7vd3j9rlw7.fsf@alter.siamese.dyndns.org> In-Reply-To: <1306111923-16859-10-git-send-email-johan@herland.net> Johan Herland writes: > I'm not really happy with excluding loose objects in the pack size > estimate. However, the size contributed by loose objects varies wildly > depending on whether a (good) delta is found. Therefore, any estimate > done at an early stage is bound to be wildly inaccurate. We could maybe > use some sort of absolute minimum size per object instead, but I > thought I should publish this version before spending more time futzing > with it... As the initial approximation, I think this implementation is fine. Continuing my comments on 7/10, "pack_to_stdout && pack_size_limit" part may need to be replaced with "total_data_limit" or something, though. After all it isn't fundamentally wrong to say "I don't want to pack more than 2GB in total" even when you are producing packs on your local disk without the --stdout option, no?