diff --git a/includes/VersioncontrolGitRepository.php b/includes/VersioncontrolGitRepository.php
index a93f1f0..01a430e 100644
--- a/includes/VersioncontrolGitRepository.php
+++ b/includes/VersioncontrolGitRepository.php
@@ -143,7 +143,11 @@ class VersioncontrolGitRepository extends VersioncontrolRepository {
   }
 
   public function fetchCommits($branch_name = NULL) {
-    $logs = $this->exec('rev-list --reverse ' . (empty($branch_name) ? '--all' : $branch_name));
+    $cmd = 'rev-list --reverse ' . (empty($branch_name) ? '--all' : $branch_name);
+    // Allow modules to alter the query so that, if needed, they can reduce
+    // the amount of logs that come back.
+    drupal_alter('verioncontrol_git_revlist', $cmd);
+    $logs = $this->exec($cmd);
     $commits = array();
     while (($line = next($logs)) !== FALSE) {
       $commits[] = trim($line);
