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

Re: Consistency question

From
Mike Hommey <mh@glandium.org>
Date
Jan 18, 2014, 01:22 UTC
Message-ID
<20140118012222.GA4381@glandium.org>
In-Reply-To
<20140115111330.GH14335@sigill.intra.peff.net>
On Wed, Jan 15, 2014 at 06:13:30AM -0500, Jeff King wrote:
Show 18 quoted lines
> On Wed, Jan 15, 2014 at 11:37:08AM +0100, David Kastrup wrote:
> 
> > The question is what guarantees I have with regard to the commit date of
> > a commit in relation to that of its parent commits:
> > 
> > a) none
> > b) commitdate(child) >= commitdate(parent)
> > c) commitdate(child) > commitdate(parent)
> 
> a) none
> 
> > Obviously, I can rely on c) being true "almost always":
> 
> Actually, b) is quite often the case in automated processes (e.g., "git
> am" or "git rebase"). The author dates are different, but the committer
> dates may be in the same second.
> 
> And of course a) is the result of clock skew and software bugs.

... or importing non-git repositories that don't have commit info separated from author info like git does. In such cases, it's usual to duplicate the author info as commit info so that clones of the same non-git repo end up with the same git sha1s. Mercurial easily allows author dates to be in a non topological order.

Mike
Previous: David Kastrup
Message 8 of 8 in “Consistency question”
  1. David KastrupJan 15, 2014
  2. Jeff KingJan 15, 2014
  3. David KastrupJan 15, 2014
  4. Andreas KreyJan 15, 2014
  5. David KastrupJan 15, 2014
  6. Andreas KreyJan 15, 2014
  7. David KastrupJan 15, 2014
  8. Mike HommeyJan 18, 2014

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.