Subject: Re: git repack --max-pack-size broken in git-next

From: Junio C Hamano <[email-masked]>
Date: Tue, 21 Jan 2014 15:01:29 -0800

Siddharth Agarwal <[email-masked]> writes:

> With git-next, the --max-pack-size option to git repack doesn't work.
>
> With git at b139ac2, `git repack --max-pack-size=1g` says
>
> error: option `max-pack-size' expects a numerical value

Thanks, Siddharth.

It seems that we have a hand-crafted parser outside parse-options
framework in pack-objects, and the scripted git-repack used to pass
this option without interpreting itself.

We probably should lift the OPT_ULONG() implementation out of
builtin/pack-objects.c and move it to parse-options.[ch] and use it
in the reimplementation of repack.

And probably use it in other places where these "integers in
human-friendly units" may make sense, but that is a separate topic.