Re: pack.packSizeLimit, safety checks
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 1, 2010, 17:19 UTC
- Message-ID
- <7vvdeg50x4.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.2.00.1002011100550.1681@xanadu.home>
Nicolas Pitre <nico@fluxnic.net> writes:
Show 6 quoted lines
> Grrrrr. This is a terrible discrepency given that all the other > arguments in Git are always byte based, with the optional k/m/g suffix, > by using git_parse_ulong(). So IMHO I'd just change --max-pack-size to > be in line with all the rest and have it accept bytes instead of MB. > And of course I'd push such a change to be included in v1.7.0 along with > the other incompatible fixes.
All of the "other incompatible" changes had ample leading time for transition with warnings and all.
I am afraid that doing this "unit change" is way too late for 1.7.0, and it makes me somewhat unhappy to hear such a suggestion. It belittles all the careful planning that has been done for these other changes to help protect the users from transition pain.
Introduce --max-pack-megabytes that is a synonym for --max-pack-size for now, and warn when --max-pack-size is used; warn that --max-pack-size will count in bytes in 1.8.0. Ship 1.7.0 with that change. --max-pack-bytes can also be added if you feel like, while at it.
But changing the unit --max-pack-size counts in to bytes in 1.7.0 feels a bit too irresponsible for the existing users.