From: Junio C Hamano <junkio@cox.net>
To: Shawn Pearce <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC 5/5] Support 'master@2 hours ago' syntax
Date: Wed, 17 May 2006 04:07:13 -0700 [thread overview]
Message-ID: <7vbqtwhpum.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060517095609.GF28529@spearce.org> (Shawn Pearce's message of "Wed, 17 May 2006 05:56:09 -0400")
Shawn Pearce <spearce@spearce.org> writes:
> Extended sha1 expressions may now include date specifications
> which indicate a point in time within the local repository's
> history. If the ref indicated to the left of '@' has a log in
> $GIT_DIR/logs/<ref> then the value of the ref at the time indicated
> by the specification is obtained from the ref's log.
This does not allow '2006-05-17 00:00:00' as the timespec, and
the documentation carefully avoids giving that example, but I
think it is better to spell that limitation out.
> +* A suffix '@' followed by a date specification such as 'yesterday'
> + (24 hours ago) or '1 month 2 weeks 3 days 1 hour 1 second ago'
> + 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>).
+ fprintf(stderr, "warning: Log %s only goes back to %s.\n",
+ logfile, show_rfc2822_date(date, tz));
+ return 0;
I am not sure about this part. If the oldest log entry was 3
hours ago, the second oldest 2 hours ago, we can tell during
that one hour period the ref was at that point. If the user
asked "ref as of four hours ago", and if the oldest log entry
had old SHA1 that is not 0{40} (because the log was not enabled
before that record), it might make more sense to give that back.
Also I wonder how much complexity would we suffer and how much
efficiency would we gain if we binary search the logdata (the
committer info is variable length, so you would need to resync
in each step).
next prev parent reply other threads:[~2006-05-17 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 9:56 [RFC 5/5] Support 'master@2 hours ago' syntax Shawn Pearce
2006-05-17 11:07 ` Junio C Hamano [this message]
2006-05-17 14:46 ` Linus Torvalds
2006-05-17 18:32 ` Junio C Hamano
2006-05-17 21:39 ` Shawn Pearce
2006-05-17 22:06 ` Shawn Pearce
2006-05-17 22:32 ` Shawn Pearce
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=7vbqtwhpum.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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).