Re: Git shouldn't allow to push a new branch called HEAD

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

Re: Git shouldn't allow to push a new branch called HEAD

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:28

Jeff King [off-list ref] writes:
So one solution is to block fetching of remote branches called HEAD
(which I would be OK with). But another is...
... Obviously there's a lot more to it than just tweaking the default fetch
refspecs. The ref lookup rules need to be changed to take this into
account. There was some discussion about this over the summer (under the
subject of possible "1.8.0" changes), but I don't think any work has
been done.
I would say discussing and ironing out the kinks of the design counts as
work, but I agree nobody was seriously interested in laying out a sensible
transition plan and discussion died out before anything concrete happened.

Regardless of the layout chanage, which probably is a 2.X topic, I think a
good first step would be to start forbidding anything that ends with _?HEAD
as a branch or tag name, on top of Michael's "enforce the refname rules more
vigorously when a ref is created" series.

Re: Git shouldn't allow to push a new branch called HEAD

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

On Mon, Nov 14, 2011 at 12:22:59PM -0800, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
So one solution is to block fetching of remote branches called HEAD
(which I would be OK with). But another is...
... Obviously there's a lot more to it than just tweaking the default fetch
refspecs. The ref lookup rules need to be changed to take this into
account. There was some discussion about this over the summer (under the
subject of possible "1.8.0" changes), but I don't think any work has
been done.
I would say discussing and ironing out the kinks of the design counts as
work, but I agree nobody was seriously interested in laying out a sensible
transition plan and discussion died out before anything concrete happened.
Yeah, I should have said "...has been done since then".
Regardless of the layout chanage, which probably is a 2.X topic, I think a
good first step would be to start forbidding anything that ends with _?HEAD
as a branch or tag name, on top of Michael's "enforce the refname rules more
vigorously when a ref is created" series.
Agreed. Changing the layout is a long-term fix, and I think disallowing
HEAD is a reasonable stop-gap measure.

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