git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Pearce <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: [RFC 5/5] Support 'master@2 hours ago' syntax
Date: Wed, 17 May 2006 17:39:08 -0400	[thread overview]
Message-ID: <20060517213908.GB30313@spearce.org> (raw)
In-Reply-To: <7v7j4kec3h.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> wrote:
> Linus Torvalds <torvalds@osdl.org> writes:
> 
> > On Wed, 17 May 2006, Junio C Hamano wrote:
> >> 
> >> 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.
> >
> > It doesn't? The "approxidate()" function should handle any reasonable date 
> > specifier, and the above is certainly more than reasonable.
> >
> > Why doesn't approxidate handle it?
> 
> The way I read the code is that get_sha1() would first do its
> magic at the first colon and feeds get_sha1_1() with prefix up
> to the first colon.  This gets passed down to get_sha1_basic()
> and what approxidate() is fed is the suffix of that prefix. It
> ends up seeing stuff between '@' and ':'.  I.e.
> 
> 	"master@2006-05-17 00:00:00:cache.h"
> 
> would ask for "00:00:cache.h" file in the "master" branch as of
> timestamp "2006-05-17 00".

Good catch.  I'll see if I can deal with it later; probably early
tomorrow morning before work.  It may just come down to documenting
this particular case as ambiguous and sure to parse the way you
did not mean it to.  :-)

I tested a bunch of other date formats but not the basic ISO.  Argh.
I'll send a test case soon for the expression parsing here, to be
sure we pull stuff from the log as expected as well as parse the
expression in a consistent way between releases.  :-)

-- 
Shawn.

  reply	other threads:[~2006-05-17 21:39 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
2006-05-17 14:46   ` Linus Torvalds
2006-05-17 18:32     ` Junio C Hamano
2006-05-17 21:39       ` Shawn Pearce [this message]
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=20060517213908.GB30313@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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).