Merge branch 'jk/filter-branch-no-index'
[gitweb.git] / shallow.c
index d49a3d6e9f02e292a04981e34f0a2d0b1ffa00d0..46be7897794ab8e350d64f00d3c11390fe993ad8 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -10,7 +10,6 @@
 #include "diff.h"
 #include "revision.h"
 #include "commit-slab.h"
-#include "sigchain.h"
 
 static int is_shallow = -1;
 static struct stat_validity shallow_stat;
@@ -401,13 +400,9 @@ static void paint_down(struct paint_info *info, const unsigned char *sha1,
        commit_list_insert(c, &head);
        while (head) {
                struct commit_list *p;
-               struct commit *c = head->item;
+               struct commit *c = pop_commit(&head);
                uint32_t **refs = ref_bitmap_at(&info->ref_bitmap, c);
 
-               p = head;
-               head = head->next;
-               free(p);
-
                /* XXX check "UNINTERESTING" from pack bitmaps if available */
                if (c->object.flags & (SEEN | UNINTERESTING))
                        continue;