Re: git and time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Sep 2006, Matthew L Foster wrote:

--- Sean <seanlkml@xxxxxxxxxxxx> wrote:

On Wed, 27 Sep 2006 18:48:11 -0700 (PDT)
Matthew L Foster <mfoster167@xxxxxxxxx> wrote:

I actually understand that and agree. All I've been saying is it (git or gitweb.cgi) should
prefer
the local timestamp rather than any "remote" timestamps for no other reason than to minimize
the
possibility of timestamps being grossly inaccurate.

But any local time stamp would be a _lie_.  The time stamp in the commit records
when it was actually created.  And as Junio has pointed out, hundreds of commits
will typically arrive in a repo at the exact same time.  Your suggestion would
have them all showing the exact same time.  That's not helpful, and it loses
important factual information.

How does git ensure that the timestamp in a commit records when it was actually created? I am not
saying throw away creation time, just that local time is more preferable and relevant and
git/gitweb.cgi should not in any way depend on time being configured correctly on each and every
git server. I think users of kernel.org's repo (or web interface) care more about when change X
was commited to it than when an author created/emailed change X, but perhaps I am wrong or don't
understand git or both.

what you are missing is that there is no one true time 'when the change was commited' to record.

the closest that you can get in a distributed environement is 'when was this change created' and that is the locally defined time on the box that created it (or as Ted stated, some much more complicated process requireing network access to a certified time server)

after it has been created it has been commited (on that box). the same change could be commited on 50 other boxes, either by receiving it through git, or by receiving it via other methods.

all 51 of the boxes above are equally important to git. the fact that one or two of those boxes happen to have a user named Linus doesn't matter.

however, if what you want to know is 'in what order did this change get into the tree I am looking at compared to other changes' git can tell you that and what it will tell you is accurate, no matter what the clocks are set to on the various systems.

David Lang
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]