From: Jonathan Nieder <jrnieder@gmail.com>
To: Theodore Tso <tytso@MIT.EDU>
Cc: jeffpc@josefsipek.net, Git Mailing List <git@vger.kernel.org>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH] guilt: Make sure the commit time is increasing
Date: Tue, 6 Jul 2010 10:09:17 -0500 [thread overview]
Message-ID: <20100706150917.GA1558@burratino> (raw)
In-Reply-To: <DD1E6EE4-1196-4FCA-87DA-EB9EBCA3AC83@mit.edu>
Theodore Tso wrote:
> You're right that it's been a while since git has run into problems with
> mild forms of clock skew (even Debian Stable is shipping v1.5.6) but
> I think it's better to times in the future if we can at all help it, and it's not
> like we're talking about a lot of extra complexity to guilt to test for this.
Sorry, I’m a little lost. There are five phenomena one could
forbid:
1. Commits with timestamp equal to or before a parent
2. Commits with timestamp before a parent
3. Commits with timestamp unreasonably long before a parent
4. Commits with timestamp unreasonably long before an ancestor
5. Commits with timestamp in the future
Git has always been able to cope with #5 (timestamps in the future).
I see no reason to avoid it, except that it is hard to assign a
timestamp for commits on top of that one.
Git’s problem today is #4 (long-term slop). Maybe as Jeff suggested
"unreasonably long" should defined per repository. Or we could
measure the kernel’s maximum (something like 120 days?) and make that
a hard limit.
Do #3 a few times, and you get #4. So ‘commit’ should warn
about it (where ‘unreasonably long’ could be as short as 0 or
1 days).
#2 (nonmonotonic commits) was broken in ancient git; I think it’s too
rigid of a rule to worry about it on that account. But a variant of
the rationale for avoiding #3 applies to it.
I have never heard of any version of Git copying poorly with #1
(commits with the same timestamp). Avoiding it artificially leads
inevitably to timestamps in the future when you somehow try to assign
100 timestamps for the series you have rebased on top of a patch
committed a few seconds ago.
Incrementing the timestamp to ensure strictly monotonic commits seems
like a recipe for trouble to me.
For guilt, I think the best thing to do would to save a Date: line
for the author date with the From: and Subject: and then touch
patches with the _current_ date when appropriate to avoid skew.
HTH,
Jonathan
next prev parent reply other threads:[~2010-07-06 15:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 2:23 [PATCH] guilt: Make sure the commit time is increasing Theodore Ts'o
2010-07-05 2:51 ` tytso
2010-07-05 3:01 ` jeffpc
2010-07-05 2:59 ` jeffpc
2010-07-05 11:06 ` Theodore Tso
2010-07-05 18:52 ` jeffpc
2010-07-05 19:22 ` tytso
2010-07-06 8:03 ` Jonathan Nieder
2010-07-06 10:56 ` Theodore Tso
2010-07-06 15:09 ` Jonathan Nieder [this message]
2010-07-06 17:12 ` tytso
2010-07-06 17:29 ` Jonathan Nieder
2010-07-06 13:53 ` Erik Faye-Lund
2010-07-06 14:29 ` Jeff King
2010-07-06 15:02 ` Erik Faye-Lund
2010-07-06 17:21 ` tytso
2010-07-06 17:29 ` jeffpc
2010-07-06 18:57 ` tytso
2010-07-14 3:01 ` Josef 'Jeff' Sipek
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=20100706150917.GA1558@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=jeffpc@josefsipek.net \
--cc=peff@peff.net \
--cc=tytso@MIT.EDU \
/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).