Thread (10 messages) flat view 10 messages, 6 authors, 2016-06-15

Re: git and time

From: Jeff King <hidden>
Date: 2016-06-15 22:42:42

On Tue, Sep 26, 2006 at 05:27:45PM -0700, Matthew L Foster wrote:
It's true I don't know much about git, what is the difference between
a changeset and a snapshot?
I think Linus' explanation covered what I meant, but please ask for
clarification if there was something that didn't make sense.
Are you saying timestamps should be tracked separately or tracked by
an scm system built on top of git?  Does/should git care about the
when of a snapshot?
Yes, they could be tracked separately. My point was that git deals in
immutable snapshot objects (commits) and you don't want to change the
commit objects after the fact. You could certainly make an external
mapping of "this commit object entered the repo at local time T" but I
doubt it would be of much use. See below.
Perhaps my question is directed more toward gitweb.cgi, it seems to me
the timestamp of when a snapshot was merged into this repository
should somehow be tracked and that is what gitweb.cgi should default
to display. For example, if someone wants to know if security bugfix X
was merged into linus' kernel tree they also want to know when that
happened, don't they?
Right. So you really want to know not "when did this commit enter this
repo" but rather "when did this head/branch first contain this commit"
(since there may be multiple branches within a repo).  We can find out
"does commit X contain commit Y" by looking at the commit graph. The
reflog system records "head H contained commit X at time T" so between
the two you can find the answer to your question (but it takes some
computation).

I think Junio's email explained this better than I could, but again,
please ask if something is unclear.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help