summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-10-30 13:07:03 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-10-30 13:07:03 -0700
commit0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe (patch)
tree4a25ada2e2aa20ecf3caf6e1af76e2ebf999cb85 /shallow.c
parentMerge branch 'mk/blame-error-message' (diff)
parentuse pop_commit() for consuming the first entry of a struct commit_list (diff)
downloadtgif-0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe.tar.xz
Merge branch 'rs/pop-commit'
Code simplification. * rs/pop-commit: use pop_commit() for consuming the first entry of a struct commit_list
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/shallow.c b/shallow.c
index 4f9d667236..46be789779 100644
--- a/shallow.c
+++ b/shallow.c
@@ -400,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;