From db6206f9de165819b1221f61e389f6aa55f2a851 Mon Sep 17 00:00:00 2001
From: Joe Woodward <j@joewoodward.me>
Date: Mon, 28 Oct 2024 14:50:47 +0000
Subject: [PATCH] Remove unused legacy method

When we switched to batched LFS downloads we used a feature flag to
split the code paths.

We cleaned up this flag in
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133078 but we
didn't remove the legacy_download_objects! method introduced in the
original MR
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122221.

This change removes the method from the codebase.
---
 .../repositories/lfs_api_controller.rb        | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/app/controllers/repositories/lfs_api_controller.rb b/app/controllers/repositories/lfs_api_controller.rb
index d696154b1a65..725c10af35f7 100644
--- a/app/controllers/repositories/lfs_api_controller.rb
+++ b/app/controllers/repositories/lfs_api_controller.rb
@@ -78,25 +78,6 @@ def download_objects!
       objects
     end
 
-    def legacy_download_objects!
-      existing_oids = project.lfs_objects_oids(oids: objects_oids)
-
-      objects.each do |object|
-        if existing_oids.include?(object[:oid])
-          object[:actions] = proxy_download_actions(object)
-
-          object[:authenticated] = true if ::Users::Anonymous.can?(:download_code, project)
-        else
-          object[:error] = {
-            code: 404,
-            message: _("Object does not exist on the server or you don't have permissions to access it")
-          }
-        end
-      end
-
-      objects
-    end
-
     def upload_objects!
       existing_oids = project.lfs_objects_oids(oids: objects_oids)
 
-- 
GitLab