Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

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

 



On Thu, Nov 13, 2014 at 01:11:46PM -0800, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> >  		if (c != '.' &&
> > -		    is_date(num3, num, num2, refuse_future, now, tm))
> > +		    is_date(num3, num, num2, refuse_future, now, tm, 0))
> >  			break;
> 
> Doesn't the new argument '0', which is "allow-future", look somewhat
> strange when we are already passing refuse_future?

To be honest, I had trouble figuring out what the name "refuse_future"
really meant. We do skip the future check, but it also means that
is_date will munge the "struct tm" directly, even if we do not find a
valid date. That worried me a bit.

But yeah, in theory, the callers I wanted to tweak can just pass in a
NULL refuse_future.

-Peff
--
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]