From 03092ca422025df6bc394bee4cc2958c34ccef4f Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Tue, 2 Jul 2024 22:43:46 +0200 Subject: [PATCH] Removed unused loadGitLocalRefs() from PhabricatorRepositoryPullEngine Summary: rP2b0ad243d179f81baad24ccd9748a4ba59017d25 introduced `private function loadGitLocalRefs()`. In rPe910c76e65e54a439a0af4735ae89c70076673d5, the only call to `loadGitLocalRefs()` was removed, using `loadGitRemoteRefs()` to load (and compare) both remote and local refs. Thus remove this unused method. Test Plan: Read/grep the code in `PhabricatorRepositoryPullEngine`. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25718 --- .../engine/PhabricatorRepositoryPullEngine.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php index 5bcf4554fd..f611c51112 100644 --- a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php @@ -602,22 +602,6 @@ final class PhabricatorRepositoryPullEngine return $map; } - private function loadGitLocalRefs(PhabricatorRepository $repository) { - $refs = id(new DiffusionLowLevelGitRefQuery()) - ->setRepository($repository) - ->execute(); - - $map = array(); - foreach ($refs as $ref) { - $fields = $ref->getRawFields(); - $map[idx($fields, 'refname')] = $ref->getCommitIdentifier(); - } - - ksort($map); - - return $map; - } - private function logRefDifferences(array $remote, array $local) { $all = $local + $remote;