From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [RFC/PATCH 0/2] Commits with ancient timestamps
Date: Thu, 2 Feb 2012 13:41:41 -0800 [thread overview]
Message-ID: <1328218903-5681-1-git-send-email-gitster@pobox.com> (raw)
Result of conversion of ancient history from other SCMs, and output from
other third-party tools, can record timestamps that predates inception of
Git. They can cause "git am", "git rebase" and "git commit --amend" to
misbehave, because the raw git timestamp e.g.
author <a.u.thor@example.com> 1328214896 -0800
are read from the commit object and passed to parse_date() machinery,
which rejects raw git timestamps without sufficient number of digits to
avoid misinterpreting human-written timestamp in other formats, and
timestamps before 1975 do not have enough number of digits in them.
Here is a two-patch series that may improve the situation.
Note that this is not meant for direct application, unless somebody uses
this extensively to make sure there is no regression.
Junio C Hamano (2):
parse_date(): allow ancient timestamps in in-header format
parse_date(): '@' prefix forces git-timestamp interpretation
date.c | 30 ++++++++++++++++++++++++++++++
git-sh-setup.sh | 2 +-
2 files changed, 31 insertions(+), 1 deletions(-)
--
1.7.9.172.ge26ae
next reply other threads:[~2012-02-02 21:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 21:41 Junio C Hamano [this message]
2012-02-02 21:41 ` [RFC/PATCH 1/2] parse_date(): allow ancient git-timestamp Junio C Hamano
2012-02-02 21:41 ` [RFC/PATCH 2/2] parse_date(): '@' prefix forces git-timestamp Junio C Hamano
2012-02-03 10:44 ` [RFC/PATCH 0/2] Commits with ancient timestamps Thomas Rast
2012-02-03 18:01 ` Junio C Hamano
2012-02-03 14:53 ` Han-Wen Nienhuys
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=1328218903-5681-1-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).