Thread (30 messages) 30 messages, 9 authors, 2016-06-15

Re: Question about 'branch -d' safety

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:06
Subsystem: the rest · Maintainer: Linus Torvalds

Clemens Buchacher wrote:
         Maybe the real solution is a reflog for deleted branch
heads, rather than being too careful about whether or not a branch
can be deleted.
Yes, I think so.  Would there be any bad side effects to this?
diff --git a/refs.c b/refs.c
index b540067..7ed0154 100644
--- a/refs.c
+++ 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;
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help