Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/linguist/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def current_tree
MAX_TREE_SIZE = 100_000

def compute_stats(old_commit_oid, cache = nil)
return {} if current_tree.count_recursive(MAX_TREE_SIZE) >= MAX_TREE_SIZE
raise "Your repo tree size exceeds the MAX_LIMIT" if current_tree.count_recursive(MAX_TREE_SIZE) >= MAX_TREE_SIZE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd reword this to be:

raise "Repository tree size exceeds MAX_LIMIT (#{MAX_LIMIT})"

Also, did you mean MAX_TREE_SIZE instead of MAX_LIMIT? I don't see the latter being used here.


old_tree = old_commit_oid && Rugged::Commit.lookup(repository, old_commit_oid).tree
read_index
Expand Down