Re: referencing a revision at a certain date

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

 



On Mon, Feb 11, 2008 at 07:04:24PM +0100, David Madore wrote:

> I understand that if "rev" denotes a certain revision, then "rev~42"
> references the commit which is 42 generations back from rev.  What I'd
> like to do is write something like "rev~@{2008-01-18}" (say) to get
> the same thing but with the 42 being computed automatically so that
> the commit in question is the latest possible (in commit date) before
> 2008-01-18.  Is this possible?  If so, how?  If not, might I suggest
> this as an addition for consideration?

How about --before=2008-01-18? As in,

  git log --before=2008-01-18

to start your log there (and "git log -1 --before=2008-01-18" if you
just want that one commit).

> I thought "rev@{2008-01-18}" did this, but apparently it doesn't: it
> requires a ref log of some kind, and I don't know how to make a ref
> log (git-clone doesn't seem to copy them).

Ref logs are a log of where your particular, local ref was pointing to.
In other words, it is a history not of the project commits, but of an
individual branch in your local repository. So you don't ask the reflog
things like "which commit has a date at X" but rather "where was my
master branch pointing at 3pm yesterday?"

And because they are purely a local matter, they don't get copied by
clone.

> So, is there some way I can either generate a ref log by
> systematically taking the first parent in each commit as per git-log
> --first-parent, OR (better) specify a revision directly that way?

So this question doesn't really make sense. You generate a ref log by
doing operations on a branch.

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

  Powered by Linux