1
0

update ExtGitGraph to cf1c21f

This commit is contained in:
Mike Schwörer 2020-01-20 16:10:10 +01:00
parent ec282b9d62
commit 63b43e882c
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -227,7 +227,7 @@ abstract class StandardGitConnection implements IRemoteSource
$target = $branch->Head; $target = $branch->Head;
$next_sha = [ $branch->HeadFromAPI ]; $next_sha = [ $branch->HeadFromAPI ];
$visited = [ $branch->HeadFromAPI ]; $visited = [ ];
$json = $this->queryCommits($repo->Name, $branch->Name, $next_sha[0]); $json = $this->queryCommits($repo->Name, $branch->Name, $next_sha[0]);
@ -257,6 +257,7 @@ abstract class StandardGitConnection implements IRemoteSource
if (count($newcommits) === 0) 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) . "})"); $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 []; return [];
} }
@ -295,7 +296,11 @@ abstract class StandardGitConnection implements IRemoteSource
$db->deleteAllCommits($branch); $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->insertNewCommits($this->name, $repo, $branch, $newcommits);
$db->setBranchHead($branch, $branch->HeadFromAPI); $db->setBranchHead($branch, $branch->HeadFromAPI);