From: Jonathan Nieder Date: Sat, 10 Jul 2010 22:17:24 GMT Subject: Re: Question about 'branch -d' safety Message-ID: <20100710221724.GA3891@burratino> In-Reply-To: Jakub Narebski wrote: > Jonathan Nieder writes: >> +++ b/refs.c >> @@ -1084,7 +1084,6 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt) >> */ >> ret |= repack_without_ref(refname); >> >> - unlink_or_warn(git_path("logs/%s", lock->ref_name)); >> invalidate_cached_refs(); >> unlock_ref(lock); >> return ret; > > It's unfortunately not so easy. The problem you have to solve is D/F > conflict: if you have 'foo/bar' branch, you can't create 'foo' branch, > but after deleting 'foo/bar' you want to be able to create 'foo' > branch and reflog for 'foo' branch. Thanks for the pointer. Here are some more, for the interested. - http://thread.gmane.org/gmane.comp.version-control.git/144250/focus=145366 the dead_refs namespace - http://thread.gmane.org/gmane.comp.version-control.git/73838/focus=73877 why to make and why not to make the change