Merge branch 'gs/retire-mru'
Retire mru API as it does not give enough abstraction over underlying list API to be worth it. * gs/retire-mru: mru: Replace mru.[ch] with list.h implementation
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
#include "reachable.h"
|
||||
#include "sha1-array.h"
|
||||
#include "argv-array.h"
|
||||
#include "mru.h"
|
||||
#include "list.h"
|
||||
#include "packfile.h"
|
||||
|
||||
static const char *pack_usage[] = {
|
||||
@ -1026,9 +1026,8 @@ static int want_object_in_pack(const struct object_id *oid,
|
||||
return want;
|
||||
}
|
||||
|
||||
list_for_each(pos, &packed_git_mru.list) {
|
||||
struct mru *entry = list_entry(pos, struct mru, list);
|
||||
struct packed_git *p = entry->item;
|
||||
list_for_each(pos, &packed_git_mru) {
|
||||
struct packed_git *p = list_entry(pos, struct packed_git, mru);
|
||||
off_t offset;
|
||||
|
||||
if (p == *found_pack)
|
||||
@ -1045,7 +1044,7 @@ static int want_object_in_pack(const struct object_id *oid,
|
||||
}
|
||||
want = want_found_object(exclude, p);
|
||||
if (!exclude && want > 0)
|
||||
mru_mark(&packed_git_mru, entry);
|
||||
list_move(&p->mru, &packed_git_mru);
|
||||
if (want != -1)
|
||||
return want;
|
||||
}
|
||||
|
Reference in New Issue
Block a user