Subject: Re: [PATCH] Make '@' not valid in a ref name.

From: Shawn Pearce <[email-masked]>
Date: Sat, 20 May 2006 22:19:20 -0400

Eric Wong <[email-masked]> wrote:
> Shawn Pearce <[email-masked]> wrote:
> > Now that the sha1 expression syntax supports looking up a ref's
> > value at a prior point in time through the '@' operator the '@'
> > operator should not be permitted in a ref name.
> 
> This would break git-archimport (where email addresses are the first
> part of the branch/tag names).

OK, so this patch is quite unpopular and should never make it
into GIT.  I'm glad we have many eyes on this mailing list!

There was just a short conversation on #git about converting
the sha1 expression evaluator into a split parser/interpreter
model.  The idea here would be to convert an expression such as

  HEAD@{yesterday}~3^{tree}

into a an expression tree such as (in LISP style):

  (peel-onion (walk-back 3 (date-spec yesterday (ref HEAD))))

with such a tree it is relatively easy to evaluate the expression,
but its also easy to determine if a ref name is valid.  Just pass
it through the parser and see if you get back anything more complex
then '(ref <input>)'.

Comments?

-- 
Shawn.