{"action":"created","comment":{"url":"https://api.github.com/repos/repotag/rjgit/pulls/comments/49743119","id":49743119,"diff_hunk":"@@ -30,6 +30,14 @@ def contents_array\n       @contents_ary ||= jtree_entries\n     end\n     \n+    def recursive_count(limit = nil)\n+      jtree_entries({recursive: true, limit: limit}).size","path":"lib/tree.rb","position":5,"original_position":5,"commit_id":"9833a681f97701176a44bce1148c81bcc50cc01f","original_commit_id":"9833a681f97701176a44bce1148c81bcc50cc01f","user":{"login":"dometto","id":147111,"avatar_url":"https://avatars.githubusercontent.com/u/147111?v=3","gravatar_id":"","url":"https://api.github.com/users/dometto","html_url":"https://github.com/dometto","followers_url":"https://api.github.com/users/dometto/followers","following_url":"https://api.github.com/users/dometto/following{/other_user}","gists_url":"https://api.github.com/users/dometto/gists{/gist_id}","starred_url":"https://api.github.com/users/dometto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dometto/subscriptions","organizations_url":"https://api.github.com/users/dometto/orgs","repos_url":"https://api.github.com/users/dometto/repos","events_url":"https://api.github.com/users/dometto/events{/privacy}","received_events_url":"https://api.github.com/users/dometto/received_events","type":"User","site_admin":false},"body":"Would it make sense to cache the results of this operation? Or not, because of the possible different `limits`?","created_at":"2016-01-14T15:54:58Z","updated_at":"2016-01-14T15:54:58Z","html_url":"https://github.com/repotag/rjgit/pull/24#discussion_r49743119","pull_request_url":"https://api.github.com/repos/repotag/rjgit/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/repotag/rjgit/pulls/comments/49743119"},"html":{"href":"https://github.com/repotag/rjgit/pull/24#discussion_r49743119"},"pull_request":{"href":"https://api.github.com/repos/repotag/rjgit/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/repotag/rjgit/pulls/24","id":56031227,"html_url":"https://github.com/repotag/rjgit/pull/24","diff_url":"https://github.com/repotag/rjgit/pull/24.diff","patch_url":"https://github.com/repotag/rjgit/pull/24.patch","issue_url":"https://api.github.com/repos/repotag/rjgit/issues/24","number":24,"state":"open","locked":false,"title":"Adds count and count_recursive methods for Tree objects.","user":{"login":"bartkamphorst","id":571173,"avatar_url":"https://avatars.githubusercontent.com/u/571173?v=3","gravatar_id":"","url":"https://api.github.com/users/bartkamphorst","html_url":"https://github.com/bartkamphorst","followers_url":"https://api.github.com/users/bartkamphorst/followers","following_url":"https://api.github.com/users/bartkamphorst/following{/other_user}","gists_url":"https://api.github.com/users/bartkamphorst/gists{/gist_id}","starred_url":"https://api.github.com/users/bartkamphorst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartkamphorst/subscriptions","organizations_url":"https://api.github.com/users/bartkamphorst/orgs","repos_url":"https://api.github.com/users/bartkamphorst/repos","events_url":"https://api.github.com/users/bartkamphorst/events{/privacy}","received_events_url":"https://api.github.com/users/bartkamphorst/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-14T12:53:12Z","updated_at":"2016-01-14T15:54:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9c10726fa77a52533dc2650b97721b36d090a6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/repotag/rjgit/pulls/24/commits","review_comments_url":"https://api.github.com/repos/repotag/rjgit/pulls/24/comments","review_comment_url":"https://api.github.com/repos/repotag/rjgit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/repotag/rjgit/issues/24/comments","statuses_url":"https://api.github.com/repos/repotag/rjgit/statuses/9833a681f97701176a44bce1148c81bcc50cc01f","head":{"label":"repotag:tree_count_methods","ref":"tree_count_methods","sha":"9833a681f97701176a44bce1148c81bcc50cc01f","user":{"login":"repotag","id":4007489,"avatar_url":"https://avatars.githubusercontent.com/u/4007489?v=3","gravatar_id":"","url":"https://api.github.com/users/repotag","html_url":"https://github.com/repotag","followers_url":"https://api.github.com/users/repotag/followers","following_url":"https://api.github.com/users/repotag/following{/other_user}","gists_url":"https://api.github.com/users/repotag/gists{/gist_id}","starred_url":"https://api.github.com/users/repotag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repotag/subscriptions","organizations_url":"https://api.github.com/users/repotag/orgs","repos_url":"https://api.github.com/users/repotag/repos","events_url":"https://api.github.com/users/repotag/events{/privacy}","received_events_url":"https://api.github.com/users/repotag/received_events","type":"Organization","site_admin":false},"repo":{"id":9103531,"name":"rjgit","full_name":"repotag/rjgit","owner":{"login":"repotag","id":4007489,"avatar_url":"https://avatars.githubusercontent.com/u/4007489?v=3","gravatar_id":"","url":"https://api.github.com/users/repotag","html_url":"https://github.com/repotag","followers_url":"https://api.github.com/users/repotag/followers","following_url":"https://api.github.com/users/repotag/following{/other_user}","gists_url":"https://api.github.com/users/repotag/gists{/gist_id}","starred_url":"https://api.github.com/users/repotag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repotag/subscriptions","organizations_url":"https://api.github.com/users/repotag/orgs","repos_url":"https://api.github.com/users/repotag/repos","events_url":"https://api.github.com/users/repotag/events{/privacy}","received_events_url":"https://api.github.com/users/repotag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/repotag/rjgit","description":"A JRuby wrapper around the JGit library for manipulating Git repositories, the Ruby way.","fork":false,"url":"https://api.github.com/repos/repotag/rjgit","forks_url":"https://api.github.com/repos/repotag/rjgit/forks","keys_url":"https://api.github.com/repos/repotag/rjgit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/repotag/rjgit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/repotag/rjgit/teams","hooks_url":"https://api.github.com/repos/repotag/rjgit/hooks","issue_events_url":"https://api.github.com/repos/repotag/rjgit/issues/events{/number}","events_url":"https://api.github.com/repos/repotag/rjgit/events","assignees_url":"https://api.github.com/repos/repotag/rjgit/assignees{/user}","branches_url":"https://api.github.com/repos/repotag/rjgit/branches{/branch}","tags_url":"https://api.github.com/repos/repotag/rjgit/tags","blobs_url":"https://api.github.com/repos/repotag/rjgit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/repotag/rjgit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/repotag/rjgit/git/refs{/sha}","trees_url":"https://api.github.com/repos/repotag/rjgit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/repotag/rjgit/statuses/{sha}","languages_url":"https://api.github.com/repos/repotag/rjgit/languages","stargazers_url":"https://api.github.com/repos/repotag/rjgit/stargazers","contributors_url":"https://api.github.com/repos/repotag/rjgit/contributors","subscribers_url":"https://api.github.com/repos/repotag/rjgit/subscribers","subscription_url":"https://api.github.com/repos/repotag/rjgit/subscription","commits_url":"https://api.github.com/repos/repotag/rjgit/commits{/sha}","git_commits_url":"https://api.github.com/repos/repotag/rjgit/git/commits{/sha}","comments_url":"https://api.github.com/repos/repotag/rjgit/comments{/number}","issue_comment_url":"https://api.github.com/repos/repotag/rjgit/issues/comments{/number}","contents_url":"https://api.github.com/repos/repotag/rjgit/contents/{+path}","compare_url":"https://api.github.com/repos/repotag/rjgit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/repotag/rjgit/merges","archive_url":"https://api.github.com/repos/repotag/rjgit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/repotag/rjgit/downloads","issues_url":"https://api.github.com/repos/repotag/rjgit/issues{/number}","pulls_url":"https://api.github.com/repos/repotag/rjgit/pulls{/number}","milestones_url":"https://api.github.com/repos/repotag/rjgit/milestones{/number}","notifications_url":"https://api.github.com/repos/repotag/rjgit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/repotag/rjgit/labels{/name}","releases_url":"https://api.github.com/repos/repotag/rjgit/releases{/id}","created_at":"2013-03-29T17:51:29Z","updated_at":"2015-09-15T13:49:31Z","pushed_at":"2016-01-14T12:53:13Z","git_url":"git://github.com/repotag/rjgit.git","ssh_url":"git@github.com:repotag/rjgit.git","clone_url":"https://github.com/repotag/rjgit.git","svn_url":"https://github.com/repotag/rjgit","homepage":"","size":31521,"stargazers_count":22,"watchers_count":22,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":22,"default_branch":"master"}},"base":{"label":"repotag:master","ref":"master","sha":"a1137eb0c1ef3c8752fc55bcf88b3baa6b8005b1","user":{"login":"repotag","id":4007489,"avatar_url":"https://avatars.githubusercontent.com/u/4007489?v=3","gravatar_id":"","url":"https://api.github.com/users/repotag","html_url":"https://github.com/repotag","followers_url":"https://api.github.com/users/repotag/followers","following_url":"https://api.github.com/users/repotag/following{/other_user}","gists_url":"https://api.github.com/users/repotag/gists{/gist_id}","starred_url":"https://api.github.com/users/repotag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repotag/subscriptions","organizations_url":"https://api.github.com/users/repotag/orgs","repos_url":"https://api.github.com/users/repotag/repos","events_url":"https://api.github.com/users/repotag/events{/privacy}","received_events_url":"https://api.github.com/users/repotag/received_events","type":"Organization","site_admin":false},"repo":{"id":9103531,"name":"rjgit","full_name":"repotag/rjgit","owner":{"login":"repotag","id":4007489,"avatar_url":"https://avatars.githubusercontent.com/u/4007489?v=3","gravatar_id":"","url":"https://api.github.com/users/repotag","html_url":"https://github.com/repotag","followers_url":"https://api.github.com/users/repotag/followers","following_url":"https://api.github.com/users/repotag/following{/other_user}","gists_url":"https://api.github.com/users/repotag/gists{/gist_id}","starred_url":"https://api.github.com/users/repotag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repotag/subscriptions","organizations_url":"https://api.github.com/users/repotag/orgs","repos_url":"https://api.github.com/users/repotag/repos","events_url":"https://api.github.com/users/repotag/events{/privacy}","received_events_url":"https://api.github.com/users/repotag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/repotag/rjgit","description":"A JRuby wrapper around the JGit library for manipulating Git repositories, the Ruby way.","fork":false,"url":"https://api.github.com/repos/repotag/rjgit","forks_url":"https://api.github.com/repos/repotag/rjgit/forks","keys_url":"https://api.github.com/repos/repotag/rjgit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/repotag/rjgit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/repotag/rjgit/teams","hooks_url":"https://api.github.com/repos/repotag/rjgit/hooks","issue_events_url":"https://api.github.com/repos/repotag/rjgit/issues/events{/number}","events_url":"https://api.github.com/repos/repotag/rjgit/events","assignees_url":"https://api.github.com/repos/repotag/rjgit/assignees{/user}","branches_url":"https://api.github.com/repos/repotag/rjgit/branches{/branch}","tags_url":"https://api.github.com/repos/repotag/rjgit/tags","blobs_url":"https://api.github.com/repos/repotag/rjgit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/repotag/rjgit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/repotag/rjgit/git/refs{/sha}","trees_url":"https://api.github.com/repos/repotag/rjgit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/repotag/rjgit/statuses/{sha}","languages_url":"https://api.github.com/repos/repotag/rjgit/languages","stargazers_url":"https://api.github.com/repos/repotag/rjgit/stargazers","contributors_url":"https://api.github.com/repos/repotag/rjgit/contributors","subscribers_url":"https://api.github.com/repos/repotag/rjgit/subscribers","subscription_url":"https://api.github.com/repos/repotag/rjgit/subscription","commits_url":"https://api.github.com/repos/repotag/rjgit/commits{/sha}","git_commits_url":"https://api.github.com/repos/repotag/rjgit/git/commits{/sha}","comments_url":"https://api.github.com/repos/repotag/rjgit/comments{/number}","issue_comment_url":"https://api.github.com/repos/repotag/rjgit/issues/comments{/number}","contents_url":"https://api.github.com/repos/repotag/rjgit/contents/{+path}","compare_url":"https://api.github.com/repos/repotag/rjgit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/repotag/rjgit/merges","archive_url":"https://api.github.com/repos/repotag/rjgit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/repotag/rjgit/downloads","issues_url":"https://api.github.com/repos/repotag/rjgit/issues{/number}","pulls_url":"https://api.github.com/repos/repotag/rjgit/pulls{/number}","milestones_url":"https://api.github.com/repos/repotag/rjgit/milestones{/number}","notifications_url":"https://api.github.com/repos/repotag/rjgit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/repotag/rjgit/labels{/name}","releases_url":"https://api.github.com/repos/repotag/rjgit/releases{/id}","created_at":"2013-03-29T17:51:29Z","updated_at":"2015-09-15T13:49:31Z","pushed_at":"2016-01-14T12:53:13Z","git_url":"git://github.com/repotag/rjgit.git","ssh_url":"git@github.com:repotag/rjgit.git","clone_url":"https://github.com/repotag/rjgit.git","svn_url":"https://github.com/repotag/rjgit","homepage":"","size":31521,"stargazers_count":22,"watchers_count":22,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/repotag/rjgit/pulls/24"},"html":{"href":"https://github.com/repotag/rjgit/pull/24"},"issue":{"href":"https://api.github.com/repos/repotag/rjgit/issues/24"},"comments":{"href":"https://api.github.com/repos/repotag/rjgit/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/repotag/rjgit/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/repotag/rjgit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/repotag/rjgit/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/repotag/rjgit/statuses/9833a681f97701176a44bce1148c81bcc50cc01f"}}}}