From 8ec640be8521047b471ccdecb0d891fbea9ca451 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 27 Oct 2024 11:56:05 -0400 Subject: [PATCH] Do not attempt to checkout a detached SHA on reclone --- .../Repository/RepositoryUpdateService.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Repository/RepositoryUpdateService.cs b/src/Tgstation.Server.Host/Components/Repository/RepositoryUpdateService.cs index 341db7f617..8b115f98a5 100644 --- a/src/Tgstation.Server.Host/Components/Repository/RepositoryUpdateService.cs +++ b/src/Tgstation.Server.Host/Components/Repository/RepositoryUpdateService.cs @@ -645,7 +645,7 @@ public async ValueTask RepositoryRecloneJob( IRepository newRepo; try { - using var cloneReporter = progressReporter.CreateSection("Cloning New Repository", 0.8); + using var cloneReporter = progressReporter.CreateSection("Cloning New Repository", 0.9); newRepo = await instance.RepositoryManager.CloneRepository( origin, oldReference, @@ -671,19 +671,6 @@ await databaseContextFactory.UseContextTaskReturn(context => throw; } - - using (newRepo) - using (var checkoutReporter = progressReporter.CreateSection("Checking out previous Detached Commit", 0.1)) - { - await newRepo.CheckoutObject( - oldSha, - currentModel.AccessUser, - currentModel.AccessToken, - false, - oldReference != null, - checkoutReporter, - cancellationToken); - } } } }