git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] guilt: Make sure the commit time is increasing

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Jul 6, 2010, 13:53 UTC
Message-ID
<AANLkTinZ4UV9in60Y4myfUWv08Vx3OMvh-_YQl2BXSjC@mail.gmail.com>
In-Reply-To
<20100706080322.GA2856@burratino>
On Tue, Jul 6, 2010 at 10:03 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 15 quoted lines
> tytso@mit.edu wrote:
>> On Mon, Jul 05, 2010 at 02:52:38PM -0400, jeffpc@josefsipek.net wrote:
>
>>> if I commit, and immediately after push 10 patches, wouldn't the HEAD end up
>>> with a commit that's ~10 minutes in the future?
>
> I don’t think git has ever required commit dates to be _strictly_
> monotonic.
>
> At one point rev-list did require monotonic --- i.e., the committer
> date of each commit had to be equal to or later than that of each of
> its parents) with no clock skew but that was considered a bug and
> fixed by v1.5.5-rc1~16 (Make revision limiting more robust against
> occasional bad commit dates, 2008-03-17)
>

This might be a stupid question, but I'm not entirely clear on why it's not a strict requirement; surely it would be easy to ensure that the commit-time is at least as big as the parents when generating the commit...?

Is it to avoid the case where a user commits with the clock set to some point (potentially far) in the future, so all subsequent commits would have the same, artificially high commit time? Or is there some other reason I can't think of?

-- 
Erik "kusma" Faye-Lund
Previous: Jonathan NiederNext: Jeff King
Message 13 of 19 in “guilt: Make sure the commit time is increasing”
  1. guilt: Make sure the commit time is increasingTheodore Ts'o, Jul 5, 2010
  2. tytso@mit.eduJul 5, 2010
  3. jeffpc@josefsipek.netJul 5, 2010
  4. jeffpc@josefsipek.netJul 5, 2010
  5. Theodore TsoJul 5, 2010
  6. jeffpc@josefsipek.netJul 5, 2010
  7. tytso@mit.eduJul 5, 2010
  8. Jonathan NiederJul 6, 2010
  9. Theodore TsoJul 6, 2010
  10. Jonathan NiederJul 6, 2010
  11. tytso@mit.eduJul 6, 2010
  12. Jonathan NiederJul 6, 2010
  13. Erik Faye-LundJul 6, 2010
  14. Jeff KingJul 6, 2010
  15. Erik Faye-LundJul 6, 2010
  16. tytso@mit.eduJul 6, 2010
  17. jeffpc@josefsipek.netJul 6, 2010
  18. tytso@mit.eduJul 6, 2010
  19. Josef 'Jeff' SipekJul 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.