Re: Re* [PATCH v3 19/22] resolve_ref(): emit warnings for improperly-formatted references
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:14
Jeff King [off-list ref] 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?
quoted
- 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.