Re: [PATCH] Remove branch by putting a null sha1 into the ref file.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Sep 18, 2006, 18:43 UTC
- Message-ID
- <7vodtdow0v.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0609180926590.4388@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 14 quoted lines
> 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/secondwhich 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 ,-).