summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorGargi Sharma <gs051095@gmail.com>2018-01-23 23:46:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-01-24 17:52:16 (GMT)
commitec2dd32c705f43ef133a54cee99426c44eb3ab88 (patch)
tree31dbbe1fe450167adf4575f1128f3e01de7da26d /cache.h
parent8865859dfc346c61f0e75fa429c5d307bd27368c (diff)
downloadgit-ec2dd32c705f43ef133a54cee99426c44eb3ab88.zip
git-ec2dd32c705f43ef133a54cee99426c44eb3ab88.tar.gz
git-ec2dd32c705f43ef133a54cee99426c44eb3ab88.tar.bz2
mru: Replace mru.[ch] with list.h implementation
Replace the custom calls to mru.[ch] with calls to list.h. This patch is the final step in removing the mru API completely and inlining the logic. This patch leads to significant code reduction and the mru API hence, is not a useful abstraction anymore. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/cache.h b/cache.h
index 49b083e..cc09e3b 100644
--- a/cache.h
+++ b/cache.h
@@ -4,7 +4,7 @@
#include "git-compat-util.h"
#include "strbuf.h"
#include "hashmap.h"
-#include "mru.h"
+#include "list.h"
#include "advice.h"
#include "gettext.h"
#include "convert.h"
@@ -1566,6 +1566,7 @@ struct pack_window {
extern struct packed_git {
struct packed_git *next;
+ struct list_head mru;
struct pack_window *windows;
off_t pack_size;
const void *index_data;
@@ -1587,10 +1588,9 @@ extern struct packed_git {
} *packed_git;
/*
- * A most-recently-used ordered version of the packed_git list, which can
- * be iterated instead of packed_git (and marked via mru_mark).
+ * A most-recently-used ordered version of the packed_git list.
*/
-extern struct mru packed_git_mru;
+extern struct list_head packed_git_mru;
struct pack_entry {
off_t offset;