Skip to content

Comments

tree: allow for a tree limit in Tree::count_recursive#996

Open
carlosmn wants to merge 1 commit intolibgit2:masterfrom
carlosmn:cmn/count-tree-limit
Open

tree: allow for a tree limit in Tree::count_recursive#996
carlosmn wants to merge 1 commit intolibgit2:masterfrom
carlosmn:cmn/count-tree-limit

Conversation

@carlosmn
Copy link
Member

Sometimes you find yourself with a repository that not only has a lot of blobs but a lot of trees without many blobs in between. Such a repository can cause count_recursive to take a long time to return.

Allow for a second limit for the number of trees. If unset we use the limit for blobs which will not have any effect unless you have less than one blob per tree, which is roughly what we're trying to protect against here.

This issue was pointed out by #995

Sometimes you find yourself with a repository that not only has a lot of blobs
but a lot of trees without many blobs in between. Such a repository can cause
`count_recursive` to take a long time to return.

Allow for a second limit for the number of trees. If unset we use the limit for
blobs which will not have any effect unless you have less than one blob per
tree, which is roughly what we're trying to protect against here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant