Page MenuHomePhabricator

When importing Git repositories, treat out-of-range timestamps as the current time
ClosedPublic

Authored by epriestley on Aug 26 2016, 12:24 PM.
Tags
None
Referenced Files
F18630767: D16456.id39582.diff
Tue, Sep 16, 12:53 PM
F18598232: D16456.diff
Sat, Sep 13, 4:38 AM
F18508013: D16456.id.diff
Fri, Sep 5, 2:33 AM
F18453945: D16456.id.diff
Mon, Sep 1, 4:42 AM
F18446291: D16456.diff
Sun, Aug 31, 9:26 PM
F18348116: D16456.diff
Tue, Aug 26, 4:21 PM
F18111252: D16456.id39586.diff
Aug 12 2025, 9:39 AM
F18014616: D16456.id39586.diff
Aug 2 2025, 5:31 PM
Subscribers
None

Details

Summary

Fixes T11537. See that task for discussion.

Although we could accommodate these faithfully, it requires a huge migration and affects one repository on one install which was written with buggy tools.

At least for now, just replace out-of-32-bit-range epoch values with the current time, which is often somewhat close to the real value.

Test Plan
  • Following the instructions in T11537, created commits in 40,000 AD.
  • Tried to import them, reproducing the "epoch" database issue.
  • Applied the patch.
  • Successfully imported future-commits, with some liberties around commit dates. Note that author date (not stored in an epoch column) is still shown faithfully:

Screen Shot 2016-08-26 at 5.20.09 AM.png (237×409 px, 24 KB)

Diff Detail

Repository
rP Phabricator
Branch
epoch-clamp
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13458
Build 17300: Run Core Tests
Build 17299: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to When importing Git repositories, treat out-of-range timestamps as the current time.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
avivey added a reviewer: avivey.
This revision is now accepted and ready to land.Aug 26 2016, 1:35 PM
This revision was automatically updated to reflect the committed changes.