Re: [PATCH] Do not ignore hidden refs

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Petr Baudis <pasky@...>
Cc: <git@...>
Date: Saturday, November 18, 2006 - 12:39 am

Petr Baudis <pasky@suse.cz> writes:


refs.c::check_ref_format() seems to suggest that any ref whose
path component begins with a dot is invalid (since October last
year), so I am a bit surprised you are bringing this up now.  Do
you know of specific examples where this is not enforced?  It
could even be argued that the places in the system that allow
such a ref are buggy.

I do not recall why we decided that this particular restriction
was needed (I do understand the other three restrictions --- see
commit log of 03feddd6), although I do think this is not a
gratuitous change but comes from a list discussion.  I suspect
it was to avoid confusion with ".." operator ("..." was added
much later in July this year), but it is not consistent that we
do not forbid the ones that end with a dot.

Maybe we should have found this inconsistency and added "names
that end with a dot" to the forbidden category when we
introduced the symmetric difference, but apparently nobody
noticed.  Right now foo...bar is seriously ambiguous.  Even
though it cannot be "foo" .. ".bar" (because ".bar" is not a
valid refname), it can be "foo." .. "bar" or "foo" ... "bar",
and worse yet spelling longhand form "refs/heads/foo." does not
help to disambiguate this.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Do not ignore hidden refs, Petr Baudis, (Sat Nov 18, 12:11 am)
Re: [PATCH] Do not ignore hidden refs, Linus Torvalds, (Sat Nov 18, 1:35 pm)
Re: [PATCH] Do not ignore hidden refs, Junio C Hamano, (Sat Nov 18, 2:35 pm)
Re: [PATCH] Do not ignore hidden refs, Junio C Hamano, (Sat Nov 18, 12:39 am)
Re: [PATCH] Do not ignore hidden refs, Petr Baudis, (Sat Nov 18, 12:53 am)
Re: [PATCH] Do not ignore hidden refs, Junio C Hamano, (Sat Nov 18, 3:27 am)
Re: [PATCH] Do not ignore hidden refs, Petr Baudis, (Sat Nov 18, 3:28 pm)
Re: [PATCH] Do not ignore hidden refs, Junio C Hamano, (Sat Nov 18, 3:50 pm)
Re: [PATCH] Do not ignore hidden refs, Junio C Hamano, (Sat Nov 18, 4:05 pm)
Re: [PATCH] Do not ignore hidden refs, Petr Baudis, (Sat Nov 18, 7:18 pm)
Re: [PATCH] Do not ignore hidden refs, Junio C Hamano, (Sat Nov 18, 8:29 pm)
Re: [PATCH] Do not ignore hidden refs, Petr Baudis, (Sat Nov 18, 8:48 pm)
Re: [PATCH] Do not ignore hidden refs, Petr Baudis, (Sat Nov 18, 3:55 pm)
Re: [PATCH] Do not ignore hidden refs, Shawn Pearce, (Sat Nov 18, 3:41 am)