Re: Is there way to set git commit --date to be older than 1970 ?
- From
Dan Johnson <computerdruid@gmail.com>
- Date
- Oct 30, 2014, 21:08 UTC
- Message-ID
- <CAPBPrnuxAPmKe_aRb9USh=cOu4jMZaYzOorXC_RJa8b8ROq+iA@mail.gmail.com>
- In-Reply-To
- <xmqqh9ymy8np.fsf@gitster.dls.corp.google.com>
On Wed, Oct 29, 2014 at 3:31 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Peter Vojtek <peter.vojtek@gmail.com> writes: > >> It seems the commit date can be between 1970 and 2100 (on my 32bit >> linux),... > > The underlying data representation records time as number of seconds > since epoch (1970-01-01). Theoretically the codepaths that read > data could consider negative timestamps to represent times before > the epoch, but in the context of source code control, negative > values are more likely to be an indication of a bug or a user > mistake, and I do not think any existing code in Git is prepared to > pass such a timestamp as a sane value---instead they diagnose a > failure and die.
I remember a pretty old thread found some success storing timestamps this way: http://comments.gmane.org/gmane.comp.version-control.git/152433
-Dan Johnson