Show 31 quoted lines
> On Sun, Jun 21, 2015 at 07:25:44PM +0100, Charles Bailey wrote:
>> From: Charles Bailey <cbailey32@bloomberg.net>
>>
>> diff --git a/parse-options.c b/parse-options.c
>> index 80106c0..101b649 100644
>> --- a/parse-options.c
>> +++ b/parse-options.c
>> @@ -180,6 +180,23 @@ static int get_value(struct parse_opt_ctx_t *p,
>> return opterror(opt, "expects a numerical value", flags);
>> return 0;
>>
>> + case OPTION_MAGNITUDE:
>> + if (unset) {
>> + *(unsigned long *)opt->value = 0;
>> + return 0;
>> + }
>> + if (opt->flags & PARSE_OPT_OPTARG && !p->opt) {
>> + *(unsigned long *)opt->value = opt->defval;
>> + return 0;
>> + }
>> + if (get_arg(p, opt, flags, &arg))
>> + return -1;
>> + if (!git_parse_ulong(arg, opt->value))
>> + return opterror(opt,
>> + "expects a integer value with an optional k/m/g suffix",
>> + flags);
>> + return 0;
>> +
>
> Spotted after sending:
> s/expects a integer/expects an integer/