summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-30 13:07:03 -0700
committerJunio C Hamano <gitster@pobox.com>2015-10-30 13:07:03 -0700
commit0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe (patch)
tree4a25ada2e2aa20ecf3caf6e1af76e2ebf999cb85 /shallow.c
parent23d58a00e55f0e5803e190ce861c5354cf19484a (diff)
parente510ab898865fdaf131e9bc9fd6ab6b7c4a94c9b (diff)
downloadgit-0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe.tar.gz
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;