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