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

Re: Defining timestamp_t as intmax_t instead of uintmax_t

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 11, 2025, 17:28 UTC
Message-ID
<xmqqv7sf32a6.fsf@gitster.g>
In-Reply-To
<629c3c21-ab11-42c1-8cb1-34698e736db6@gmail.com>
Arnav Bhate <bhatearnav@gmail.com> writes:
> timestamp_t is a data type defined in git-compat-util.h as uintmax_t since
> 28f4aee3fb (use uintmax_t for timestamps, 2017-04-26). It was introduced with
> dddbad728c (timestamp_t: a new data type for timestamps, 2017-04-26) to replace
> use of both time_t and unsigned long for time-related uses.

I do not think the object format and the existing object parsers are prepared to handle timestamp before the epoch.

You may want to go back to the list archive for discussions around the choice of the type back then, which should have enough information to go by.

https://lore.kernel.org/git/20170228200145.ymbqmxwrbbrwagks@sigill.intra.peff.net/
might be a good starting point.
https://lore.kernel.org/git/?q=f:peff@+d:20170201..20170430+timestamp_t

gives 6 entry points to a single large thread that may be worth following before tackling this topic further.

Thanks.
Previous: Arnav BhateNext: Arnav Bhate
Message 3 of 4 in “Defining timestamp_t as intmax_t instead of uintmax_t”
  1. Arnav BhateMar 11, 2025
  2. Arnav BhateMar 11, 2025
  3. Junio C HamanoMar 11, 2025
  4. Arnav BhateMar 11, 2025

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.