add tests for cloning corrupted repositories
[gitweb.git] / builtin / reflog.c
index 1fedf66329d73f192d80d3d42789c290a839d7b0..72a0af70c3dcd7d108887cd289bc7b3c606226aa 100644 (file)
@@ -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);