{"thread":{"id":"35222","subject":"Well-past commit dates unsupported","startedAt":"2013-10-28T10:04:22Z","lastAt":"2013-10-28T10:04:22Z","messageCount":1,"participants":["Jean LAULIAC"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"229636","messageId":"CALM1TLiVTq6kPB7Ke_VDEc+Fs8u5NknCOHH_CuOzphQY3b_HeA@mail.gmail.com","threadId":"35222","inReplyTo":null,"subject":"Well-past commit dates unsupported","fromName":"Jean LAULIAC","fromEmail":"jean@lauliac.com","sentAt":"2013-10-28T10:04:22Z","receivedAt":"2013-10-28T10:04:22Z","isPatch":false,"sender":{"key":"jean@lauliac.com","avatar":null},"body":"Hi there,\n\nI'm trying to use a well-past date for a git commit, before the UNIX Epoch, but\nthis does not work for the reasons below. I'm on Mac OS X 10.8, git version\n1.8.3.4, and `sizeof(time_t) == 8`. The date I'm trying to set is October 4,\n1958, that is around timestamp -354808800.\n\nFirst technique, using the commit `--date` flags with ISO 8601: it says\n\"invalid date\".\n\nSecond technique, described in the git ml archive, not using the porcelain:\nhttp://article.gmane.org/gmane.comp.version-control.git/152497/\n\n    git commit\n    git cat-file -p HEAD > tmp.txt\n    # at this point, edit the file to replace the timestamp\n\n    git hash-object -t commit -w tmp.txt\n    #=> 2ee8fcc02658e23219143f5bcfe6f9a4615745f9\n    git update-ref -m 'commit: foo' refs/heads/master \\\n        2ee8fcc02658e23219143f5bcfe6f9a4615745f9\n\nCommit date is effectively updated, but `git show` clamps the date to zero\n(`Jan 1 1970`). `tig(1)` displays `55 years ago` so the actual commit date is\nproperly stored.\n\nLast issue: when trying to push this commit to a remote repository:\n\n    #=> remote: error: object 2ee8fcc02658e23219143f5bcfe6f9a4615745f9:invalid\n    #       author/committer line - bad date\n    #=> remote: fatal: Error in object\n    #=> error: unpack failed: index-pack abnormal exit\n\nFinally, when running `test-date` from git sources:\n\n    ./test-date show -354808800\n    #=> -354808800 -> in the future\n\nIs it a deliberate git behavior? Is fully supporting past or far future dates\nin the roadmap, since the referenced message above from 2010? Should I try\nto make a patch?\n\nThanks!\n\nPS: use case for past dates is to match the historical law changes. As others\ndid before, I'm trying to map the history of France Constitution to git.\n\n-- \nJean Lauliac <jean@lauliac.com>\n"}]}