From 7f8ee4e32966074623b02e6585f86db110d735e8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 5 May 2015 15:44:34 -0700 Subject: [PATCH] Fix a bug with DiffusionMergedCommitsQueryConduitAPIMethod Summary: We were adding "+1" to PHP_INT_MAX, which could cause us to wrap and run `git log -n -9223372036854775808 ...`. Git, unable to give us negative nine trillion zillion results, would then exit without producing results. Test Plan: Got results out of this method. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D12726 --- .../conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php index 71c8014de5..fd618a291e 100644 --- a/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php @@ -24,7 +24,8 @@ final class DiffusionMergedCommitsQueryConduitAPIMethod } private function getLimit(ConduitAPIRequest $request) { - return $request->getValue('limit', PHP_INT_MAX); + // TODO: Paginate this sensibly at some point. + return $request->getValue('limit', 4096); } protected function getGitResult(ConduitAPIRequest $request) {