From 63b43e882ce0b848a37404d2a0bd38bfbbd9fad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 20 Jan 2020 16:10:10 +0100 Subject: [PATCH] update ExtGitGraph to cf1c21f --- www/extern/egg/RemoteSource.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/extern/egg/RemoteSource.php b/www/extern/egg/RemoteSource.php index 558320d..bd58fa8 100644 --- a/www/extern/egg/RemoteSource.php +++ b/www/extern/egg/RemoteSource.php @@ -227,7 +227,7 @@ abstract class StandardGitConnection implements IRemoteSource $target = $branch->Head; $next_sha = [ $branch->HeadFromAPI ]; - $visited = [ $branch->HeadFromAPI ]; + $visited = [ ]; $json = $this->queryCommits($repo->Name, $branch->Name, $next_sha[0]); @@ -257,6 +257,7 @@ abstract class StandardGitConnection implements IRemoteSource if (count($newcommits) === 0) { $this->logger->proclog("Found no new commits for: [" . $this->name . "|" . $repo->Name . "|" . $branch->Name . "] (HEAD at {" . substr($branch->HeadFromAPI, 0, 8) . "})"); + if ($branch->HeadFromAPI !== $branch->Head) $db->setBranchHead($branch, $branch->HeadFromAPI); return []; } @@ -295,7 +296,11 @@ abstract class StandardGitConnection implements IRemoteSource $db->deleteAllCommits($branch); - if (count($newcommits) === 0) return []; + if (count($newcommits) === 0) + { + if ($branch->HeadFromAPI !== $branch->Head) $db->setBranchHead($branch, $branch->HeadFromAPI); + return []; + } $db->insertNewCommits($this->name, $repo, $branch, $newcommits); $db->setBranchHead($branch, $branch->HeadFromAPI);