Skip to content

Commit 9daaef8

Browse files
authored
Make 'git checkout' fault tolerant (#334)
'git checkout' operations are now reliant on network connectivity due to the use of `--filter=tree:0`. Therefore we need to invoke them using the fault tolerant function.
1 parent b3d4c26 commit 9daaef8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

UET/Redpoint.Uet.Workspace/PhysicalGit/DefaultPhysicalGitCheckout.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ private async Task CheckoutTargetCommitAsync(
947947
int exitCode;
948948

949949
_logger.LogInformation($"Checking out target commit {resolvedReference.TargetCommit}...");
950-
exitCode = await _processExecutor.ExecuteAsync(
950+
exitCode = await FaultTolerantGitAsync(
951951
new ProcessSpecification
952952
{
953953
FilePath = gitContext.Git,
@@ -980,7 +980,7 @@ private async Task CheckoutTargetCommitAsync(
980980
{
981981
// Re-attempt checkout...
982982
_logger.LogInformation($"Re-attempting check out of target commit {resolvedReference.TargetCommit}...");
983-
exitCode = await _processExecutor.ExecuteAsync(
983+
exitCode = await FaultTolerantGitAsync(
984984
new ProcessSpecification
985985
{
986986
FilePath = gitContext.Git,
@@ -1482,7 +1482,7 @@ private async Task CheckoutSubmoduleAsync(
14821482

14831483
// Checkout the target commit.
14841484
_logger.LogInformation($"Checking out submodule {submodule.Path} target commit {submoduleCommit}...");
1485-
exitCode = await _processExecutor.ExecuteAsync(
1485+
exitCode = await FaultTolerantGitAsync(
14861486
new ProcessSpecification
14871487
{
14881488
FilePath = git,

0 commit comments

Comments
 (0)