From: Holger Schurig <hs4233@mail.mn-solutions.de>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Nicolas Pitre <nico@cam.org>
Subject: Re: How to (re-)create .git/logs/refs
Date: Tue, 13 May 2008 14:13:14 +0200 [thread overview]
Message-ID: <200805131413.14753.hs4233@mail.mn-solutions.de> (raw)
In-Reply-To: <alpine.DEB.1.00.0805131244300.30431@racer>
> Are you sure you understand what @{date} does? It shows you
> the state _this_ repository was in at that date.
Who says so? "man git-rev-parse" just says:
o A ref followed by the suffix @ with a date specification
enclosed in a brace pair (e.g. {yesterday}, {1 month 2 weeks 3
days 1 hour 1 second ago} or {1979-02-26 18:30:00}) to specify
the value of the ref at a prior point in time. This suffix may
only be used immediately following a ref name and the ref
must have an existing log ($GIT_DIR/logs/<ref>).
It just states "at a prior point in time", not "at a prior point
in time in your git repository/checkout".
> It is a common misconception that you can reference anything
> by date in a distributed setup. (Before you ask, I will just
> mention "clock skew" and "parallel branches" to give you an
> idea why this is a misconception.)
My idea was to use the first commit (from git-rev-log) where the
date is below the specified date.
To give you some context: Bitbake (from www.openembedded.org) is
a tool that can download software, patch it, configure it,
compile it and create packages out of it. Nothing fancy, except
that it can do this for a huge amount of embedded devices,
usually using a cross-compiler for ARM, MIPS, whatever.
And it can download not just tar files, it can also use CVS, SVN,
hg, git and so on.
In Openembedded, many patch recipes specify the version to use.
If you deal with versioned stuff, e.g.
filename-frob-3.14.tar.bz, this is fine. Sometimes the version
is a SVN revision number. And sometimes it's a git, mercury or
monotone hash. However, the latter beast are almost
non-describing. So many bitbake recipes specify a SRCDATE, and
you can immediately see if SRCDATE=20070501 that it uses an
ancient version of the software, from 1st May 2007. You won't
see that if it would specify
GIT_REV=6e2df4fd066c450b0b3c8e0f1769d4163e2b52c4. Of course you
can do
GIT_REV=6e2df4fd066c450b0b3c8e0f1769d4163e2b52c4
# This is from 2007 May 1st
but then you're redundant and chances are high that those two
lines get out-of-sync.
So, when I have SRCDATE=20070501, I'd be happy if git would, for
me, find out that this is
6e2df4fd066c450b0b3c8e0f1769d4163e2b52c4, even when the commit
6e2df4fd066c450b0b3c8e0f1769d4163e2b52c4 was not done on my
local machine, but is a commit that I pulled from the outside.
Also, when I do "git checkout @{20070501}", I don't usually mind
if, e.g. because of time-skew or multi-heads, I'm not at the
17th commit in this area, but on the top-most for which this
condition is true. I can use "git log" and "git reset" or
whatever to dig my way to the state I want, but git would do the
dull work for me.
next prev parent reply other threads:[~2008-05-13 12:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 10:56 How to (re-)create .git/logs/refs Holger Schurig
2008-05-08 12:28 ` Holger Schurig
2008-05-08 17:28 ` Nicolas Pitre
2008-05-13 6:42 ` Holger Schurig
2008-05-13 9:11 ` Holger Schurig
2008-05-13 9:38 ` Andreas Ericsson
2008-05-13 11:46 ` Johannes Schindelin
2008-05-13 12:13 ` Holger Schurig [this message]
2008-05-13 13:24 ` Jakub Narebski
2008-05-13 13:50 ` Holger Schurig
-- strict thread matches above, loose matches on Subject: below --
2008-05-08 9:48 Holger Schurig
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=200805131413.14753.hs4233@mail.mn-solutions.de \
--to=hs4233@mail.mn-solutions.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=nico@cam.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).