summaryrefslogtreecommitdiff
path: root/pack-objects.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-10 14:03:46 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-10 14:03:47 -0700
commite6e24c94df9df6d39f2316113c14fe07d2ab03d7 (patch)
tree1f883be2ac3f3a84ce5af3cd1e9e32c45648e21e /pack-objects.h
parentb8688adb12d086b161aa7c369126bdd56843a01b (diff)
parentc9af708b1a5a92cbde2a0c9a75b13530f792ac84 (diff)
downloadgit-e6e24c94df9df6d39f2316113c14fe07d2ab03d7.tar.gz
Merge branch 'jk/pack-objects-optim-mru'
"git pack-objects" in a repository with many packfiles used to spend a lot of time looking for/at objects in them; the accesses to the packfiles are now optimized by checking the most-recently-used packfile first. * jk/pack-objects-optim-mru: pack-objects: use mru list when iterating over packs pack-objects: break delta cycles before delta-search phase sha1_file: make packed_object_info public provide an initializer for "struct object_info"
Diffstat (limited to 'pack-objects.h')
-rw-r--r--pack-objects.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/pack-objects.h b/pack-objects.h
index d1b98b30ff..cc9b9a9b90 100644
--- a/pack-objects.h
+++ b/pack-objects.h
@@ -27,6 +27,15 @@ struct object_entry {
unsigned no_try_delta:1;
unsigned tagged:1; /* near the very tip of refs */
unsigned filled:1; /* assigned write-order */
+
+ /*
+ * State flags for depth-first search used for analyzing delta cycles.
+ */
+ enum {
+ DFS_NONE = 0,
+ DFS_ACTIVE,
+ DFS_DONE
+ } dfs_state;
};
struct packing_data {