1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

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
This commit is contained in:
epriestley 2015-05-05 15:44:34 -07:00
parent 7e4d5f76c0
commit 7f8ee4e329

View file

@ -24,7 +24,8 @@ final class DiffusionMergedCommitsQueryConduitAPIMethod
} }
private function getLimit(ConduitAPIRequest $request) { 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) { protected function getGitResult(ConduitAPIRequest $request) {