diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-08-08 14:48:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-08 14:48:39 -0700 |
commit | 78849622ec58ae576f36b155824e813543a9bdf5 (patch) | |
tree | 5b1c92c1beb5bfdd6072c31e8ba85d541ac2146a /cache.h | |
parent | Merge branch 'jk/difftool-in-subdir' (diff) | |
parent | pack-objects: compute local/ignore_pack_keep early (diff) | |
download | tgif-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.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |