summaryrefslogtreecommitdiff
path: root/pack-objects.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-28 13:52:20 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-28 13:52:21 -0700
commit252ef8fe9e9742c73339cd383c22e39387c6c94e (patch)
treeebb2d69102445fd7fc51e3eb03cf878c1adde64b /pack-objects.h
parent930405224f0953ec550e2da8bf5a0b632cc5ba36 (diff)
parent42b766d765feb2e0867954eb665ff05e3441b547 (diff)
downloadgit-252ef8fe9e9742c73339cd383c22e39387c6c94e.tar.gz
Merge branch 'jk/delta-chain-limit' into maint
"git repack --depth=<n>" for a long time busted the specified depth when reusing delta from existing packs. This has been corrected. * jk/delta-chain-limit: pack-objects: convert recursion to iteration in break_delta_chain() pack-objects: enforce --depth limit in reused deltas
Diffstat (limited to 'pack-objects.h')
-rw-r--r--pack-objects.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pack-objects.h b/pack-objects.h
index cc9b9a9b90..03f1191659 100644
--- a/pack-objects.h
+++ b/pack-objects.h
@@ -30,12 +30,16 @@ struct object_entry {
/*
* State flags for depth-first search used for analyzing delta cycles.
+ *
+ * The depth is measured in delta-links to the base (so if A is a delta
+ * against B, then A has a depth of 1, and B a depth of 0).
*/
enum {
DFS_NONE = 0,
DFS_ACTIVE,
DFS_DONE
} dfs_state;
+ int depth;
};
struct packing_data {