OSDN Git Service

reflog: fix typo in "reflog expire" clean-up codepath
authorJunio C Hamano <gitster@pobox.com>
Tue, 5 Mar 2013 20:44:42 +0000 (12:44 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Mar 2013 20:49:59 +0000 (12:49 -0800)
In "reflog expire" we were not clearing the REACHABLE bit from
objects reachable from the tip of refs we marked earlier.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reflog.c

index b3c9e27..ef56e7b 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);