From: Jeff King <peff@peff.net>
To: David Madore <david.madore@ens.fr>
Cc: GIT mailing-list <git@vger.kernel.org>
Subject: Re: referencing a revision at a certain date
Date: Mon, 11 Feb 2008 13:29:34 -0500 [thread overview]
Message-ID: <20080211182934.GA23351@sigill.intra.peff.net> (raw)
In-Reply-To: <20080211180424.GA4905@clipper.ens.fr>
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
next prev parent reply other threads:[~2008-02-11 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 18:04 referencing a revision at a certain date David Madore
2008-02-11 18:29 ` Jeff King [this message]
2008-02-11 18:40 ` Jakub Narebski
2008-02-11 18:57 ` David Madore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080211182934.GA23351@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=david.madore@ens.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).