Re: [BUG] incorrect search result returned when using git log with a future date parameter
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 30, 2013, 19:57 UTC
- Message-ID
- <7vsj5ijvei.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <51090466.9070105@casparzhang.com>
Caspar Zhang <caspar@casparzhang.com> writes:
> .... A date parsing function should parse _all dates with > correctly format_, despite if it's an old date, or the date in the > future.
When it is fed 2013-02-12, it is ambiguous and "approxidate" can and should use whatever heuristics (including rejection of future) to guess what the user wanted, but 2013-02-13 cannot be interpreted in any other way, so we should parse it as such.
Patches welcome, as long as the fix does not make things worse for cases other than you observed.
Thanks.