Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-14 00:39:05 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-14 00:39:05 +0300
commitafc8aa3fbf249cfc2f75c7586b9d32f172ab97a1 (patch)
tree9e094f4c5032333ff27eadd42a3b6040aa3473a7 /builtin
parent6bed209a20a06f2d6b7142216dabff456de798e1 (diff)
parent8865859dfc346c61f0e75fa429c5d307bd27368c (diff)
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pack-objects.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 6c71552cdf..0c3d03de48 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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;