mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Abstracting the pager and improving the pagination system
This commit is contained in:
@@ -222,9 +222,15 @@ class Repository
|
||||
* @access public
|
||||
* @return integer Total number of commits
|
||||
*/
|
||||
public function getTotalCommits()
|
||||
public function getTotalCommits($file = null)
|
||||
{
|
||||
$commits = $this->getClient()->run($this, "rev-list --all --count");
|
||||
$command = "rev-list --all --count";
|
||||
|
||||
if ($file) {
|
||||
$command .= " $file";
|
||||
}
|
||||
|
||||
$commits = $this->getClient()->run($this, $command);
|
||||
return $commits;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user