public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: the.tester@mac.com
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Date and time processing issue
Date: Sun, 4 Aug 2024 16:15:57 +0200	[thread overview]
Message-ID: <E76CDCA3-A788-4B96-8C84-4175C4CE5F0E@mac.com> (raw)
In-Reply-To: <xmqqplqqew38.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]



> On 2. Aug 2024, at 18:19, Junio C Hamano <gitster@pobox.com> wrote:
> 
> the.tester@mac.com writes:
> 
>> To me, the error message is at least misleading.
> 
> Correct.  The error message is prepared for the most common case
> where people ask for an invalid format, but does not pay attention
> to the fact that some timestamps are not out of range in the Git
> timescale and such an out of range timestamp can be fed to the
> program.
> 
> Something along the following line may be a good first step to fix
> it.
> 
> builtin/commit.c | 2 +-
> ident.c          | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git c/builtin/commit.c w/builtin/commit.c
> index 66427ba82d..24de55ae86 100644
> --- c/builtin/commit.c
> +++ w/builtin/commit.c
> ………
> or date out of range: %s"),
> +    date_str);
> }
> else
> strbuf_addstr(ident, ident_default_date());
> 


Yes, that would improve the error message.
Would it make sense to create a pull request for this? – If so, should I do it? Or you?, Neither or us?

(That said, I wished I were familiar enough with C, to allow Git processing of a wider range of dates, but I’m not.)



[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-08-04 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  9:46 Date and time processing issue the.tester
2024-08-02 16:19 ` Junio C Hamano
2024-08-04 14:15   ` the.tester [this message]
2024-08-05  1:14 ` Jeff King

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=E76CDCA3-A788-4B96-8C84-4175C4CE5F0E@mac.com \
    --to=the.tester@mac.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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