From: Shawn Pearce <spearce@spearce•org>
To: Eric Wong <normalperson@hand•yhbt.net>
Cc: Junio Hamano <junkio@cox•net>,
git@vger•kernel.org, Martin Langhoff <martin.langhoff@gmail•com>
Subject: Re: [PATCH] Make '@' not valid in a ref name.
Date: Sat, 20 May 2006 22:19:20 -0400 [thread overview]
Message-ID: <20060521021919.GA7700@spearce.org> (raw)
In-Reply-To: <20060521020038.GA22926@hand.yhbt.net>
Eric Wong <normalperson@hand•yhbt.net> wrote:
> Shawn Pearce <spearce@spearce•org> 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.
prev parent reply other threads:[~2006-05-21 2:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-21 1:37 [PATCH] Make '@' not valid in a ref name Shawn Pearce
2006-05-21 1:42 ` Junio C Hamano
2006-05-21 1:58 ` Shawn Pearce
2006-05-21 2:00 ` Eric Wong
2006-05-21 2:19 ` Shawn Pearce [this message]
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=20060521021919.GA7700@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
--cc=martin.langhoff@gmail$(echo .)com \
--cc=normalperson@hand$(echo .)yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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