summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-06 04:00:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-06 04:00:37 (GMT)
commite3b199aef13077d2bef7445dd76f760deda14cd8 (patch)
tree3e9b498b1d0c97398d41a5f9ee22c43c27732d9f /cache.h
parent67498507699641549094f0cbf8800f88176b50c9 (diff)
parentee1c6c34ac64c1e10b17a50710ea7002b7e7241f (diff)
downloadgit-e3b199aef13077d2bef7445dd76f760deda14cd8.zip
git-e3b199aef13077d2bef7445dd76f760deda14cd8.tar.gz
git-e3b199aef13077d2bef7445dd76f760deda14cd8.tar.bz2
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.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index b320b1a..b34447f 100644
--- a/cache.h
+++ b/cache.h
@@ -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 */