Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Tue, Apr 16, 2013 at 04:22:25PM -0700, Junio C Hamano wrote:
>
>> +static void parse_expire_value(const char *value, unsigned long *expire)
>> +{
>> +	if (!strcmp(value, "never") || !strcmp(value, "false"))
>> +		*expire = 0;
>> +	else if (!strcmp(value, "all") || !strcmp(value, "now"))
>> +		/*
>> +		 * We take over "now" here, which usually translates
>> +		 * to the current timestamp, because the user really
>> +		 * means everything she has done in the past, and by
>> +		 * definition reflogs are the record of the past,
>> +		 * there is nothing from the future to be kept.
>> +		 */
>> +		*expire = ULONG_MAX;
>> +	else
>> +		*expire = approxidate(value);
>> +}
>
> Do we want to use approxidate_careful here to catch other junk?

We can catch a misspelt argument or configuration value that way.
That would be a good idea.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]