summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-08-08 14:48:39 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-08 14:48:39 -0700
commit78849622ec58ae576f36b155824e813543a9bdf5 (patch)
tree5b1c92c1beb5bfdd6072c31e8ba85d541ac2146a /cache.h
parentMerge branch 'jk/difftool-in-subdir' (diff)
parentpack-objects: compute local/ignore_pack_keep early (diff)
downloadtgif-78849622ec58ae576f36b155824e813543a9bdf5.tar.xz
Merge branch 'jk/pack-objects-optim'
"git pack-objects" has a few options that tell it not to pack objects found in certain packfiles, which require it to scan .idx files of all available packs. The codepaths involved in these operations have been optimized for a common case of not having any non-local pack and/or any .kept pack. * jk/pack-objects-optim: pack-objects: compute local/ignore_pack_keep early pack-objects: break out of want_object loop early find_pack_entry: replace last_found_pack with MRU cache add generic most-recently-used list sha1_file: drop free_pack_by_name t/perf: add tests for many-pack scenarios
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index e8128fc5d6..7c8051be0a 100644
--- a/cache.h
+++ b/cache.h
@@ -1378,6 +1378,13 @@ extern struct packed_git {
char pack_name[FLEX_ARRAY]; /* more */
} *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).
+ */
+struct mru;
+extern struct mru *packed_git_mru;
+
struct pack_entry {
off_t offset;
unsigned char sha1[20];
@@ -1417,7 +1424,6 @@ extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t
extern void close_pack_windows(struct packed_git *);
extern void close_all_packs(void);
extern void unuse_pack(struct pack_window **);
-extern void free_pack_by_name(const char *);
extern void clear_delta_base_cache(void);
extern struct packed_git *add_packed_git(const char *path, size_t path_len, int local);