summaryrefslogtreecommitdiff
path: root/Documentation/gitattributes.txt
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-11-14 04:48:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-14 05:57:53 (GMT)
commit436e7a74c638bc9de2e585ce3eb0fd4bd6e06115 (patch)
treecc5c70ae6761b14766e9c444ba43c517fea4ffdc /Documentation/gitattributes.txt
parent245de36f035f9d549df2b1509787c25648fd611f (diff)
downloadgit-436e7a74c638bc9de2e585ce3eb0fd4bd6e06115.zip
git-436e7a74c638bc9de2e585ce3eb0fd4bd6e06115.tar.gz
git-436e7a74c638bc9de2e585ce3eb0fd4bd6e06115.tar.bz2
Don't allow fast-import tree delta chains to exceed maximum depth
Brian Downing noticed fast-import can produce tree depths of up to 6,035 objects and even deeper. Long delta chains can create very small packfiles but cause problems during repacking as git needs to unpack each tree to count the reachable blobs. What's happening here is the active branch cache isn't big enough. We're swapping out the branch and thus recycling the tree information (struct tree_content) back into the free pool. When we later reload the tree we set the delta_depth to 0 but we kept the tree we just reloaded as a delta base. So if the tree we reloaded was already at the maximum depth we wouldn't know it and make the new tree a delta. Multiply the number of times the branch cache has to swap out the tree times max_depth (10) and you get the maximum delta depth of a tree created by fast-import. In Brian's case above the active branch cache had to swap the branch out 603/604 times during this import to produce a tree with a delta depth of 6035. Acked-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitattributes.txt')
0 files changed, 0 insertions, 0 deletions