diff --git a/lib/scm/gitlab.class.php b/lib/scm/gitlab.class.php index 861bffbd95..1d702b267b 100644 --- a/lib/scm/gitlab.class.php +++ b/lib/scm/gitlab.class.php @@ -646,7 +646,7 @@ class gitlab $param = new stdclass(); $param->path = urldecode($path); - $param->ref_name = $toRevision ? $toRevision : $this->branch; + $param->ref_name = ($toRevision != 'HEAD' and $toRevision) ? $toRevision : $this->branch; $fromDate = $this->getCommittedDate($fromRevision); $toDate = $this->getCommittedDate($toRevision); diff --git a/module/repo/model.php b/module/repo/model.php index 2f13bb5f2e..ab12ca3c29 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -882,7 +882,7 @@ class repoModel extends model $scm = $this->app->loadClass('scm'); $scm->setEngine($repo); - $logs = $scm->log('', $lastInDB ? $lastInDB->revision : 0, ''); + $logs = $scm->log('', $lastInDB ? $lastInDB->revision : 0); if(empty($logs)) return false; /* Process logs. */