Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Remove branch by putting a null sha1 into the ref file.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:40

Linus Torvalds [off-list ref] writes:
On Mon, 18 Sep 2006, Christian Couder wrote:
quoted
With the new packed ref file format from Linus, this should be
the new way to remove a branch.
Well, it's not really sufficient.

Somebody should add this test-case

	git branch test
	git branch -d test
	git branch test/first

which should work.
Also this test-case needs to be added

	git branch test
        git pack-refs
        rm .git/refs/heads/test
        git branch test/second

which should barf.  Otherwise it would allow both test and
test/second branches to exist, and trying to clone from such a
repository would fail, at least by the existing tools (it might
have been even nicer if we from day one allowed both test and
test/second to exist, though, but it is too late now, or too
early before we upgrade everybody).
It's entirely possible that the proper way to do branch deletion with 
packed branches is to simply re-pack without the old branch, rather than 
the negative branch model. I couldn't really decide.
Or mkdir there ,-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help