diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-06 06:00:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-06 06:00:37 +0200 |
commit | e3b199aef13077d2bef7445dd76f760deda14cd8 (patch) | |
tree | 3e9b498b1d0c97398d41a5f9ee22c43c27732d9f /cache.h | |
parent | Merge branch 'mm/usage-log-l-can-take-regex' (diff) | |
parent | sha1_file: only freshen packs once per run (diff) | |
download | git-e3b199aef13077d2bef7445dd76f760deda14cd8.tar.xz git-e3b199aef13077d2bef7445dd76f760deda14cd8.zip |
Merge branch 'jk/prune-mtime'
Access to objects in repositories that borrow from another one on a
slow NFS server unnecessarily got more expensive due to recent code
becoming more cautious in a naive way not to lose objects to pruning.
* jk/prune-mtime:
sha1_file: only freshen packs once per run
sha1_file: freshen pack objects before loose
reachable: only mark local objects as recent
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1206,6 +1206,7 @@ extern struct packed_git { int pack_fd; unsigned pack_local:1, pack_keep:1, + freshened:1, do_not_close:1; unsigned char sha1[20]; /* something like ".git/objects/pack/xxxxx.pack" */ @@ -1321,14 +1322,16 @@ int for_each_loose_file_in_objdir_buf(struct strbuf *path, /* * Iterate over loose and packed objects in both the local - * repository and any alternates repositories. + * repository and any alternates repositories (unless the + * LOCAL_ONLY flag is set). */ +#define FOR_EACH_OBJECT_LOCAL_ONLY 0x1 typedef int each_packed_object_fn(const unsigned char *sha1, struct packed_git *pack, uint32_t pos, void *data); -extern int for_each_loose_object(each_loose_object_fn, void *); -extern int for_each_packed_object(each_packed_object_fn, void *); +extern int for_each_loose_object(each_loose_object_fn, void *, unsigned flags); +extern int for_each_packed_object(each_packed_object_fn, void *, unsigned flags); struct object_info { /* Request */ |