Skip to content

Commit

Permalink
Do not attempt to checkout a detached SHA on reclone
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Oct 27, 2024
1 parent 2f6f53c commit 8ec640b
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
}
}
}

0 comments on commit 8ec640b

Please sign in to comment.