Subject: Re: Question about 'branch -d' safety

From: Clemens Buchacher <[email-masked]>
Date: Wed, 14 Jul 2010 00:21:05 +0200

On Tue, Jul 13, 2010 at 09:00:23AM +0100, Will Palmer wrote:
> 
> With that in mind, would it not be enough to simply remove the ref, but
> not the reflog, and change the logic to let the reflog live on until
> either pruned or all of its entries have expired normally?

That's the idea. The only reason why this patch renames the reflog
after deletion is due to the current directory style layout of refs
and reflogs. In particular, it is not possible to have refs foo/bar
and foo at the same time, since that would be a directory/file
conflict.

I therefore rename reflogs of deleted refs to foo~/bar, for
example, which for all intents and purposes is still the reflog of
foo/bar, only now it's not in the way of creating a new ref foo.
The fact that we rename the ref internally should be transparent to
the user.

Clemens