From: Shawn Pearce Date: Sun, 21 May 2006 02:19:20 GMT Subject: Re: [PATCH] Make '@' not valid in a ref name. Message-ID: <20060521021919.GA7700@spearce.org> In-Reply-To: <20060521020038.GA22926@hand.yhbt.net> Eric Wong wrote: > Shawn Pearce 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 )'. Comments? -- Shawn.