{"thread":{"id":"5694","subject":"fsck objects and timestamp ordering","startedAt":"2006-09-25T16:32:47Z","lastAt":"2006-09-25T17:39:54Z","messageCount":5,"participants":["Jon Smirl","Shawn Pearce","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"27625","messageId":"9e4733910609250932r146fea7alaaf858a18a8b50b0@mail.gmail.com","threadId":"5694","inReplyTo":null,"subject":"fsck objects and timestamp ordering","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-09-25T16:32:47Z","receivedAt":"2006-09-25T16:32:47Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"When running fsck objects, does it verify that timestamps are ordered\nin the same order as the dependency chains?\n\nI am having trouble with a CVS repository where the timestamp ordering\nand dependency order are in conflict. It would be best if git didn't\nexperience the same problem.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"27627","messageId":"20060925164004.GB27043@spearce.org","threadId":"5694","inReplyTo":"9e4733910609250932r146fea7alaaf858a18a8b50b0@mail.gmail.com","subject":"Re: fsck objects and timestamp ordering","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-09-25T16:40:04Z","receivedAt":"2006-09-25T16:40:04Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jon Smirl <jonsmirl@gmail.com> wrote:\n> When running fsck objects, does it verify that timestamps are ordered\n> in the same order as the dependency chains?\n\nNo and it can't.  Clock skew between systems could be several\nminutes to several hours which means you may have earlier commits\nbuilding onto later commits.\n\nThe better place to check this (although we don't today) is in\ngit-commit-tree.  If the new commit's committer timestamp is older\nthan any of its parent's committer timestamps git-commit-tree\nshould probably at least issue a warning that there's a possible\ntimestamp problem on either this system or the system that created\none of those parent commits.\n\nIf the committer has a problem with that timestamp issue they could\naddress it and ammend the commit before the error propagates.\n \n> I am having trouble with a CVS repository where the timestamp ordering\n> and dependency order are in conflict. It would be best if git didn't\n> experience the same problem.\n\nIt would be best if Git didn't experience a lot of the weird stuff\npeople were able to do to their CVS repositories.  Fortunately the\nfriendly folks on this mailing list have put the better part of a\nyear and a half into doing just that.  :)\n\n-- \nShawn.\n"},{"id":"27628","messageId":"20060925164855.GC27043@spearce.org","threadId":"5694","inReplyTo":"20060925164004.GB27043@spearce.org","subject":"Re: fsck objects and timestamp ordering","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-09-25T16:48:55Z","receivedAt":"2006-09-25T16:48:55Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Shawn Pearce <spearce@spearce.org> wrote:\n> Jon Smirl <jonsmirl@gmail.com> wrote:\n> > I am having trouble with a CVS repository where the timestamp ordering\n> > and dependency order are in conflict. It would be best if git didn't\n> > experience the same problem.\n> \n> It would be best if Git didn't experience a lot of the weird stuff\n> people were able to do to their CVS repositories.  Fortunately the\n> friendly folks on this mailing list have put the better part of a\n> year and a half into doing just that.  :)\n\nWow, on reread that last sentance seems to imply that the fine\npeople who have contributed to Git have spent the past year and a\nhalf making sure Git has plenty of weird stuff contained within it.\nWhich is not what I meant at all.  :)\n\nMy brain's just not working today (some sort of head cold thing\ngoing on).  Its probably best that I stay away from anything that\nrequires any sort of logic...  such as English.\n\n-- \nShawn.\n"},{"id":"27629","messageId":"Pine.LNX.4.64.0609250951220.3952@g5.osdl.org","threadId":"5694","inReplyTo":"9e4733910609250932r146fea7alaaf858a18a8b50b0@mail.gmail.com","subject":"Re: fsck objects and timestamp ordering","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-09-25T17:03:24Z","receivedAt":"2006-09-25T17:03:24Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 25 Sep 2006, Jon Smirl wrote:\n>\n> When running fsck objects, does it verify that timestamps are ordered\n> in the same order as the dependency chains?\n\nNo. In fact, it's perfectly normal that they aren't.\n\nTwo machines with different timestamps will think time is different, and \nthen one side doing a merge may have it's parents \"in the future\" from \nitself.\n\nYou can't even solve it sanely: you can't change the other sides \ntime-stamps after the fact, and correcting the _merge_ timestamp to be \nlater than both parents is a fix worse than the problem, since it would \ntend to just perpetuate a buggy timestamp further down the line.\n\nSo this is very fundamental. The first rule of distributed computing is: \n\"There is no common time\". Any distributed project that thinks such a \nthing exists is just fundamentally flawed, so I'd have been personally \nembarrassed by such a design decision.\n\nSo the only thing that matters is always the dependency chain. We've \noccasionally discussed having \"sequence numbers\" or other things to make \nit easier to decide on partial ordering between commits without having to \nactually follow the whole dependency chain, but times and dates is _never_ \na valid thing to use for that.\n\n> I am having trouble with a CVS repository where the timestamp ordering\n> and dependency order are in conflict. It would be best if git didn't\n> experience the same problem.\n\nIt's not really a problem. The timestamps don't \"matter\". The only thing \ngit really cares about is the dependency order.\n\nIf commit timestamps aren't ordered, some of our programs may look at \nunnecessarily many commits because the heuristics use the (committer) \ntimestamp as a way to guess which leg of a parenthood chain to take, but \nthat's just a guess.\n\nAnd the authorship timestamp is never used at all, except purely for \noutput. So they show up in the log messages, but you can think of them as \nnothing more than the commit commentary. \n\n\t\t\tLinus\n"},{"id":"27631","messageId":"9e4733910609251039o1a9df1aelf948a68e4f6fb42f@mail.gmail.com","threadId":"5694","inReplyTo":"Pine.LNX.4.64.0609250951220.3952@g5.osdl.org","subject":"Re: fsck objects and timestamp ordering","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-09-25T17:39:54Z","receivedAt":"2006-09-25T17:39:54Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"It might be worthwhile to print out a warning on commit if the commit\ntimestamp is earlier than the previous commit. That might weed out\nsome people with their clocks set wrong.\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"}]}