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
Arnav Bhate <bhatearnav@gmail.com>
Date
Mar 11, 2025, 18:23 UTC
Message-ID
<ab2af3ec-f4cf-4337-82ce-7c4ade244568@gmail.com>
In-Reply-To
<xmqqv7sf32a6.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> 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.

Looks like I bit off more than I could chew. Maybe this could be a medium-sized project in itself.

Show 14 quoted lines
> 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.
I'll go through it.
-- 
Regards,
Arnav Bhate
(He/Him)
Previous: Junio C Hamano
Message 4 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.