Merge branch 'ot/mru-on-list'

The first step to getting rid of mru API and using the
doubly-linked list API directly instead.

* ot/mru-on-list:
  mru: use double-linked list from list.h
This commit is contained in:
Junio C Hamano
2018-02-13 13:39:05 -08:00
4 changed files with 33 additions and 59 deletions

View File

@ -1009,8 +1009,8 @@ static int want_object_in_pack(const struct object_id *oid,
struct packed_git **found_pack,
off_t *found_offset)
{
struct mru_entry *entry;
int want;
struct list_head *pos;
if (!exclude && local && has_loose_object_nonlocal(oid->hash))
return 0;
@ -1026,7 +1026,8 @@ static int want_object_in_pack(const struct object_id *oid,
return want;
}
for (entry = packed_git_mru.head; entry; entry = entry->next) {
list_for_each(pos, &packed_git_mru.list) {
struct mru *entry = list_entry(pos, struct mru, list);
struct packed_git *p = entry->item;
off_t offset;