Re: Re* [PATCH v3 19/22] resolve_ref(): emit warnings for improperly-formatted references

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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.

Re: Re* [PATCH v3 19/22] resolve_ref(): emit warnings for improperly-formatted references

From: Jeff King <hidden>
Date: 2016-06-15 22:52:14

On Tue, Oct 11, 2011 at 02:31:48PM -0700, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
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?
Fine by me. I'm not sure anyone is even aware that it exists. Just to
double-check, I grepped the list archives, and the biggest mention of it
was its presence causing a weird bug:

  http://thread.gmane.org/gmane.comp.version-control.git/143737

Googling turns up only confusion, nobody actually using it or
recommending that it be used.

OTOH, it does actually serialize branch renames, since we take a lock on
it. Maybe that's important. Cc'ing Lars. Certainly renaming it would be
the conservative choice.

-Peff

PS I mentioned above that it does not actually create a reflog. Digging
in the code more, I think it is capable of it, but my git.git clone had
RENAMED-REF, but no reflog. I would have thought core.logAllRefUpdates
would turn it on, but maybe there is a funny interaction with things not
in refs/.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help