Re: Re* [PATCH v3 19/22] resolve_ref(): emit warnings for improperly-formatted references
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 11, 2011, 21:31 UTC
- Message-ID
- <7vpqi3dxkr.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20111011203903.GA23069@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> But in the code, it is spelled RENAMED-REF (with a dash). And as far as > I can tell, does not actually create a reflog. And it's not documented > anywhere, so I suspect nobody is using it. Maybe it is worth switching > that name.
Or even better get rid of it?
Show 9 quoted lines
>> - dwim_ref() can be fed "refs/heads/master" and is expected to dwim it to >> the master branch. > > It looks like your code will allow any subdirectory. I had thought to > limit it to "refs/". Otherwise, my "config" example could be > "objects/pack", or "lost-found/commits", "remotes/foo", or something. > Obviously the longer the name, the smaller the possibility of an > accidental collision. But I couldn't think of any other subdirectory > into which refs should go.
I wanted to start as loose as possible to avoid negatively impacting existing users, later to tighten. As fsck and friends never look outside of refs/, I think the prefix refs/ is a reasonable restriction that is safe.