diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-30 13:07:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-30 13:07:03 -0700 |
commit | 0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe (patch) | |
tree | 4a25ada2e2aa20ecf3caf6e1af76e2ebf999cb85 /shallow.c | |
parent | Merge branch 'mk/blame-error-message' (diff) | |
parent | use pop_commit() for consuming the first entry of a struct commit_list (diff) | |
download | tgif-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.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; |