Skip to contentSkip to conversation

reflog: fix typo in "reflog expire" clean-up codepath

PATCH New Junio C Hamano 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reflog: fix typo in "reflog expire" clean-up codepath

In "reflog expire" we were not clearing the REACHABLE bit from objects reachable from the tip of refs we marked earlier.

---
 builtin/reflog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/reflog.c +1 -1
index b3c9e27..ef56e7b 100644
@@ -414,7 +414,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
 		if (cb.unreachable_expire_kind == UE_HEAD) {
 			struct commit_list *elem;
 			for (elem = tips; elem; elem = elem->next)
-				clear_commit_marks(tip_commit, REACHABLE);
+				clear_commit_marks(elem->item, REACHABLE);
 			free_commit_list(tips);
 		} else {
 			clear_commit_marks(tip_commit, REACHABLE);
Signature · 1 line
1.8.2-rc2-187-g1ea4a7c