From: Junio C Hamano <gitster@pobox.com>
To: Mike Gorchak <mike.gorchak.qnx@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/1] Fix date checking in case if time was not initialized.
Date: Mon, 25 Feb 2013 11:04:57 -0800 [thread overview]
Message-ID: <7vr4k4xlie.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAHXAxrMaQRdBxSvNO+no_9d==v0tVnkpXtguTKyfvnm-VfR_xA@mail.gmail.com> (Mike Gorchak's message of "Mon, 25 Feb 2013 20:43:37 +0200")
Mike Gorchak <mike.gorchak.qnx@gmail.com> writes:
>>> 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).
> 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...
next prev parent reply other threads:[~2013-02-25 19:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 8:36 [PATCH 1/1] Fix date checking in case if time was not initialized Mike Gorchak
2013-02-25 18:26 ` Junio C Hamano
2013-02-25 18:43 ` Mike Gorchak
2013-02-25 19:04 ` Junio C Hamano [this message]
2013-02-25 19:32 ` Mike Gorchak
2013-02-25 19:37 ` Junio C Hamano
2013-02-25 21:47 ` Mike Gorchak
2013-02-25 22:07 ` Junio C Hamano
2013-02-26 18:58 ` Mike Gorchak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr4k4xlie.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mike.gorchak.qnx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).