On 04/17/2013 01:22 AM, Junio C Hamano wrote:
> Michael Haggerty <mhag...@alum.mit.edu> writes:
>> would be that it expires *everything*. But in fact it seems to only
>> expire things that are at least one second old, which doesn't seem at
>> all useful in the real world. "--expire=all" is accepted without
>> complaint but doesn't do what one would hope.
> Perhaps that is worth fixing, independent of this topic.
> Approxidate gives the current time for anything it does not
> understand, and that is how --expire=all is interpreted as "anything
> older than now". For that matter, even a string "now" has long been
> interpreted as the current time with the same "I do not understand
> it, so I'll give you the current timestamp" logic, until we added an
> official support for "now" at 93cfa7c7a85e (approxidate_careful()
> reports errorneous date string, 2010-01-26) for entirely different
> A completely untested patch for your enjoyment...
I enjoy it :-) But it would be better to put the the function in the
date module ("approxidate_expiry_careful()"?) and also use it from other
places where an expiry date is being parsed, like
reflog expire --expire=<date>/--expire-unreachable=<date>
(maybe there are others). And the special values "all" etc. would need
to be documented.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html