mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
Revert "run record commit if its the first time seen"
Summary: This reverts commit 22e606d49e
.
Test Plan: none
Reviewers: epriestley, nh
Reviewed By: nh
CC: nh, vrana, aran, Korvin
Differential Revision: https://secure.phabricator.com/D2833
This commit is contained in:
parent
22e606d49e
commit
a75da4efac
1 changed files with 10 additions and 20 deletions
|
@ -329,8 +329,7 @@ final class PhabricatorRepositoryPullLocalDaemon
|
|||
private static function updateCommit(
|
||||
PhabricatorRepository $repository,
|
||||
$commit_identifier,
|
||||
$branch,
|
||||
$exists) {
|
||||
$branch) {
|
||||
|
||||
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
||||
'repositoryID = %s AND commitIdentifier = %s',
|
||||
|
@ -349,7 +348,6 @@ final class PhabricatorRepositoryPullLocalDaemon
|
|||
$data->setCommitDetail('seenOnBranches', $branches);
|
||||
$data->save();
|
||||
|
||||
if (!$exists) {
|
||||
self::insertTask(
|
||||
$repository,
|
||||
$commit,
|
||||
|
@ -357,7 +355,6 @@ final class PhabricatorRepositoryPullLocalDaemon
|
|||
'only' => true
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
private static function insertTask(
|
||||
PhabricatorRepository $repository,
|
||||
|
@ -615,17 +612,10 @@ final class PhabricatorRepositoryPullLocalDaemon
|
|||
$target);
|
||||
$epoch = trim($epoch);
|
||||
|
||||
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
||||
'repositoryID = %s AND commitIdentifier = %s',
|
||||
$repository->getID(),
|
||||
$target);
|
||||
|
||||
if (!$commit) {
|
||||
self::recordCommit($repository, $target, $epoch);
|
||||
}
|
||||
|
||||
if ($branch !== null) {
|
||||
self::updateCommit($repository, $target, $branch, $commit);
|
||||
self::updateCommit($repository, $target, $branch);
|
||||
} else {
|
||||
self::recordCommit($repository, $target, $epoch);
|
||||
}
|
||||
|
||||
if (empty($insert)) {
|
||||
|
|
Loading…
Reference in a new issue