From: Junio C Hamano <gitster@pobox.com>
To: Peter Vojtek <peter.vojtek@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Is there way to set git commit --date to be older than 1970 ?
Date: Wed, 29 Oct 2014 12:31:54 -0700 [thread overview]
Message-ID: <xmqqh9ymy8np.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAOE_JxJp0nA_p_42yOyk_nMjsyMaovj0Fx6AJ5nywiEQfB5XAQ@mail.gmail.com> (Peter Vojtek's message of "Wed, 29 Oct 2014 19:49:19 +0100")
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 understand that this is rather an esoteric use case :)
Yeah, this is pretty much outside of what we intend to support.
Thanks.
next prev parent reply other threads:[~2014-10-29 19:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 18:49 Is there way to set git commit --date to be older than 1970 ? Peter Vojtek
2014-10-29 19:19 ` Fredrik Gustafsson
2014-10-29 19:50 ` Peter Vojtek
2014-10-29 19:31 ` Junio C Hamano [this message]
2014-10-29 20:03 ` Roberto Eduardo Decurnex Gorosito
2014-10-30 21:08 ` Dan Johnson
2014-10-30 21:48 ` Jeff King
2014-10-30 22:11 ` Junio C Hamano
2014-10-30 17:24 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqh9ymy8np.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peter.vojtek@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.