Re: Is there way to set git commit --date to be older than 1970 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Vojtek <peter.vojtek@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]