Fixing wc -l implementation on getTotalCommits

This commit is contained in:
Klaus Silveira
2012-06-07 02:03:32 -03:00
parent 6aeb19c5ba
commit df8f74a9cb

View File

@@ -224,12 +224,14 @@ class Repository
*/
public function getTotalCommits($file = null)
{
$command = "rev-list --all | wc -l";
$command = "rev-list --all";
if ($file) {
$command .= " $file";
}
$command .= " | wc -l";
$commits = $this->getClient()->run($this, $command);
return $commits;
}