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

From: Junio C Hamano <>
Date: 2006-09-19 04:43:44
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 ,-).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at
Received on Tue Sep 19 04:43:53 2006

This archive was generated by hypermail 2.1.8 : 2006-09-19 04:44:37 EST