Thread (9 messages) flat view 9 messages, 5 authors, 2016-06-15

Re: check-ref-format: include refs/ in the argument or to strip it?

From: Jonathan Nieder <hidden>
Date: 2016-06-15 23:02:19

Possibly related (same subject, not in this thread)

Junio C Hamano wrote:
               implication of which is that the 'at least one slash'
rule was to expect things are 'refs/<anything>' so there will be at
least one.  Even back then, that <anything> alone had at least one
slash (e.g. heads/master), but the intention was *never* that we
would forbid <anything> that does not have a slash by feeding
<anything> part alone to check-ref-format, i.e. things like
"refs/stash" were designed to be allowed.
Now I'm more confused.  Until 5f7b202a (2008-01-01), there was a
comment

		if (level < 2)
			return -2; /* at least of form "heads/blah" */

and that behavior has been preserved since the beginning.

Why do most old callers pass a string that doesn't start with refs/
(e.g., see the callers in 03feddd6, 2005-10-13)?  Has the intent been
to relax the requirement since then?

Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help