From: Junio C Hamano Date: Mon, 18 Sep 2006 18:43:44 GMT Subject: Re: [PATCH] Remove branch by putting a null sha1 into the ref file. Message-ID: <7vodtdow0v.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > On Mon, 18 Sep 2006, Christian Couder wrote: >> >> 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 ,-).