git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Date and time processing issue

From
Tthe.tester@mac.com <the.tester@mac.com>
Date
Aug 4, 2024, 14:15 UTC
Message-ID
<E76CDCA3-A788-4B96-8C84-4175C4CE5F0E@mac.com>
In-Reply-To
<xmqqplqqew38.fsf@gitster.g>
Show 30 quoted lines
> 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.)
Previous: Junio C HamanoNext: Jeff King
Message 3 of 4 in “Date and time processing issue”
  1. the.tester@mac.comAug 2, 2024
  2. Junio C HamanoAug 2, 2024
  3. the.tester@mac.comAug 4, 2024
  4. Jeff KingAug 5, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.