aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-13 14:05:50 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-13 14:05:50 -0700
commitebb464f0cba9efcb5552fad02f452f09f68fc9b2 (patch)
tree0e92a74cf718ef8fd1e0ac54d2e4669088d4200b /cache.h
parenta60abe10f2d54c668966f804bb400d21d08008a3 (diff)
parentee1c6c34ac64c1e10b17a50710ea7002b7e7241f (diff)
downloadgit-ebb464f0cba9efcb5552fad02f452f09f68fc9b2.tar.gz
git-ebb464f0cba9efcb5552fad02f452f09f68fc9b2.tar.xz
Merge branch 'jk/prune-mtime' into maint
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 3d3244ba6..eabde3828 100644
--- a/cache.h
+++ b/cache.h
@@ -1174,6 +1174,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" */
@@ -1289,14 +1290,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 */