Re: [PATCH 1/1] Fix date checking in case if time was not initialized.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2013, 19:04 UTC
- Message-ID
- <7vr4k4xlie.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAHXAxrMaQRdBxSvNO+no_9d==v0tVnkpXtguTKyfvnm-VfR_xA@mail.gmail.com>
Mike Gorchak <mike.gorchak.qnx@gmail.com> writes:
Show 10 quoted lines
>>> Fix is_date() function failings in detection of correct date in case >>> if time was not properly initialized. >> >> Please explain why this patch is needed and what problem this patch >> is trying to fix (if any) a bit better in the proposed log message. >> For example, on what input do we call this function with partially >> filled *r, and is that an error in the code, or is it an indication >> that the input has only been consumed partially? > > function is_date() must not fail if time fields are not set.
> Currently is_date() invokes tm_to_time_t() which perform check of > time fields. With these fixes t0006-date.sh test is no longer > fail on these tests:
The thing that puzzles me is that nobody reported that the following fail on their platforms (and they do not fail for me on platforms I have to test in my real/virtual boxes).
Show 8 quoted lines
> check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 +0000' > check_parse '2008-02-14 20:30:45 -0500' '2008-02-14 20:30:45 -0500' > check_parse '2008-02-14 20:30:45 -0015' '2008-02-14 20:30:45 -0015' > check_parse '2008-02-14 20:30:45 -5' '2008-02-14 20:30:45 +0000' > check_parse '2008-02-14 20:30:45 -5:' '2008-02-14 20:30:45 +0000' > check_parse '2008-02-14 20:30:45 -05' '2008-02-14 20:30:45 -0500' > check_parse '2008-02-14 20:30:45 -:30' '2008-02-14 20:30:45 +0000' > check_parse '2008-02-14 20:30:45 -05:00' '2008-02-14 20:30:45 -0500'
So there must be something _else_ going on, and I cannot tell what that something else is from your code change nor from the log message. I'd like to see that explained.
Still puzzled...