All of lore.kernel.org
 help / color / mirror / Atom feed
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: Thu, 30 Oct 2014 10:24:48 -0700	[thread overview]
Message-ID: <xmqqr3xpwjvj.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), however man git (section DATE FORMATS) claims ISO 8601
> standard is supported.

The date formats section of "git log" only talks about the output
format (I do not see in "man git" any section about date formats, by
the way), once Git understands and records the timestamp in its
internal representation (which is "seconds since the epoch"; as I
already said, theoretically it should be possible to record negative
number of seconds there, the current code does not allow it).

The documentation may need to be clarified, independent from what
the implementation does on the input side.  The current text from
"git log" reads like so:

       --date=(relative|local|default|iso|iso-strict|rfc|short|raw)
           Only takes effect for dates shown in human-readable
           format, such as when using --pretty.  log.date config
           variable sets a default value for the log command’s
           --date option.

The word "shown" is meant to stress that this description is about
output side, but apparently it was misread as if somehow a user can
affect the input by giving --date=iso or something, so perhaps you
would want to suggest a better phrasing?

Thanks.

      parent reply	other threads:[~2014-10-30 17:25 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
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 [this message]

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=xmqqr3xpwjvj.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.