From 03163f18188fbd616f4ea1db82438b3536297567 Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Mon, 27 Feb 2023 12:55:13 +0800 Subject: [PATCH] * Resolve ticket #419. --- lib/scm/gitea.class.php | 4 ++-- module/repo/control.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/scm/gitea.class.php b/lib/scm/gitea.class.php index 96e0d9a6bf..1719cf691c 100644 --- a/lib/scm/gitea.class.php +++ b/lib/scm/gitea.class.php @@ -218,8 +218,8 @@ class Gitea $path = ltrim($path, DIRECTORY_SEPARATOR); $count = $count == 0 ? '' : "-n $count"; /* compatible with svn. */ - if($fromRevision == 'HEAD' and $this->branch) $fromRevision = $this->branch; - if($toRevision == 'HEAD' and $this->branch) $toRevision = $this->branch; + if($fromRevision === 'HEAD' and $this->branch) $fromRevision = $this->branch; + if($toRevision === 'HEAD' and $this->branch) $toRevision = $this->branch; if($fromRevision === $toRevision) { $logs = array(); diff --git a/module/repo/control.php b/module/repo/control.php index fead011113..8cc8fd6b44 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -1372,7 +1372,7 @@ class repo extends control $content = file($logFile); $lastLine = $content[count($content) - 1]; - if(!strpos($lastLine, 'done')) + if(strpos($lastLine, 'done') !== false) { if(strpos($lastLine, 'empty repository') !== false) {