Re: Question about 'branch -d' safety
flat view
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:06
Jakub Narebski wrote:
Jonathan Nieder [off-list ref] writes:
quoted
+++ 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