Re: git repack --max-pack-size broken in git-next
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 21, 2014, 23:01 UTC
- Message-ID
- <xmqqzjmprlbq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <52DEF927.7090005@fb.com>
Siddharth Agarwal <sid0@fb.com> writes:
Show 5 quoted lines
> 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.