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

Re: commit-graph overflow generation chicken and egg

From
Derrick Stolee <derrickstolee@github.com>
Date
Jul 4, 2022, 20:50 UTC
Message-ID
<a154e109-3f4c-c500-3365-d47879abf30d@github.com>
In-Reply-To
<YsLE+DVa5Hd/NqdD@ncase>
On 7/4/22 4:46 AM, Patrick Steinhardt wrote:
> On Fri, Jul 01, 2022 at 02:07:03PM +0200, Patrick Steinhardt wrote:
> While I still haven't been able to reproduce the error, I did find a
> different error. Here's the reproducer, which works with Git v2.37.0 and
> older:

Hi Patrick. Thanks for taking a close look. There is an issue here, and it's due to using a negative timestamp:

> + GIT_COMMITTER_DATE='1970-01-01T00:00:00 +0100'

Because of the "+0100" in the time zone, this date becomes a negative value. The commit-graph does not store dates with more than 34 bits (and Git does not handle negative timestamps very well? Peff can clarify here).

The commit-graph could certainly warn better here to say we do not have enough date bits to store this timestamp (the same would happen with a date beyond 2138 or something like that).

However, this is a failure since the commit-graph first started parsing dates in 177722b3442 (commit: integrate commit graph with commit parsing, 2018-04-10).

Thanks, -Stolee

Previous: Patrick SteinhardtNext: Will Chandler
Message 6 of 13 in “commit-graph overflow generation chicken and egg”
  1. Jeff KingJun 8, 2022
  2. Derrick StoleeJun 8, 2022
  3. Jeff KingJun 8, 2022
  4. Patrick SteinhardtJul 1, 2022
  5. Patrick SteinhardtJul 4, 2022
  6. Derrick StoleeJul 4, 2022
  7. Will ChandlerJul 5, 2022
  8. Taylor BlauJul 5, 2022
  9. Jeff KingJul 6, 2022
  10. Jeff KingJul 6, 2022
  11. Ævar Arnfjörð BjarmasonJun 9, 2022
  12. Jeff KingJun 9, 2022
  13. Derrick StoleeJun 9, 2022

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.