Re: git and time

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

 



On Tue, 26 Sep 2006 17:27:45 -0700 (PDT)
Matthew L Foster <mfoster167@xxxxxxxxx> wrote:


> It's true I don't know much about git, what is the difference between a changeset and a snapshot?
> 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?
> 
> 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? 

You are right that a "Merged Date:" in gitweb would be useful information to
show for each commit, but it's not straightforward given the design of git.

Each commit contains the date and time it was first created.  Because this value
is used as part of each commits' unique hash value, it can not be changed without
breaking a very fundamental part of Git.  This means that Git can not easily
answer the question of which date any particular commit was merged with the
local repository.

To help address this, the "reflog" feature was added (i believe by Shawn Pearce)
which records a local time stamp when pulling in changes from other repositories.
It should be possible to query this log to get the information you desire, but I
don't think it would be efficient enough to do in gitweb unless the values were
cached instead of queried each time.

Sean
-
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]