@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "run record commit if its the first time seen"

Summary: This reverts commit 22e606d49e83ba3cbffcabd9d2a2fd74ee6759da.

Test Plan: none

Reviewers: epriestley, nh

Reviewed By: nh

CC: nh, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2833

Jason Ge a75da4ef 22e606d4

+10 -20
+10 -20
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
··· 329 329 private static function updateCommit( 330 330 PhabricatorRepository $repository, 331 331 $commit_identifier, 332 - $branch, 333 - $exists) { 332 + $branch) { 334 333 335 334 $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( 336 335 'repositoryID = %s AND commitIdentifier = %s', ··· 349 348 $data->setCommitDetail('seenOnBranches', $branches); 350 349 $data->save(); 351 350 352 - if (!$exists) { 353 - self::insertTask( 354 - $repository, 355 - $commit, 356 - array( 357 - 'only' => true 358 - )); 359 - } 351 + self::insertTask( 352 + $repository, 353 + $commit, 354 + array( 355 + 'only' => true 356 + )); 360 357 } 361 358 362 359 private static function insertTask( ··· 615 612 $target); 616 613 $epoch = trim($epoch); 617 614 618 - $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( 619 - 'repositoryID = %s AND commitIdentifier = %s', 620 - $repository->getID(), 621 - $target); 622 - 623 - if (!$commit) { 615 + if ($branch !== null) { 616 + self::updateCommit($repository, $target, $branch); 617 + } else { 624 618 self::recordCommit($repository, $target, $epoch); 625 - } 626 - 627 - if ($branch !== null) { 628 - self::updateCommit($repository, $target, $branch, $commit); 629 619 } 630 620 631 621 if (empty($insert)) {