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:06 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-14 00:39:06 +0300
commit867622398f7e7a8a7c6e7a5418e7cbdcffc44d02 (patch)
tree7e42f2fe39327130caa1fdbfc221b85b8cb3a163 /builtin
parentafc8aa3fbf249cfc2f75c7586b9d32f172ab97a1 (diff)
parentec2dd32c705f43ef133a54cee99426c44eb3ab88 (diff)
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pack-objects.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 0c3d03de48..83dcbc9773 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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;
}