Skip to content

Commit

Permalink
Merge pull request #387 from microsoft/main
Browse files Browse the repository at this point in the history
Staging - 5/7/24
  • Loading branch information
EricJohnson327 authored May 8, 2024
2 parents d73afd7 + 21826af commit d41fc6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/GitHubExtension/Providers/RepositoryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public IAsyncOperation<ProviderOperationResult> CloneRepositoryAsync(IRepository
var cloneOptions = new LibGit2Sharp.CloneOptions
{
Checkout = true,
RecurseSubmodules = true,
};

if (developerId != null)
Expand Down Expand Up @@ -267,12 +268,12 @@ public IAsyncOperation<ProviderOperationResult> CloneRepositoryAsync(IRepository
catch (LibGit2Sharp.LibGit2SharpException libGitTwoException)
{
Log.Error(libGitTwoException, $"Either no logged in account has access to this repository, or the repository can't be found.");
return new ProviderOperationResult(ProviderOperationStatus.Failure, libGitTwoException, "LibGit2 library threw an exception.", "LibGit2 library threw an exception.");
return new ProviderOperationResult(ProviderOperationStatus.Failure, libGitTwoException, libGitTwoException.Message, libGitTwoException.Message);
}
catch (Exception e)
{
Log.Error(e, "Could not clone the repository.");
return new ProviderOperationResult(ProviderOperationStatus.Failure, e, "Something happened when cloning the repository.", "Something happened when cloning the repository.");
return new ProviderOperationResult(ProviderOperationStatus.Failure, e, e.Message, e.Message);
}

return new ProviderOperationResult(ProviderOperationStatus.Success, new ArgumentException("Nothing wrong"), "Nothing wrong", "Nothing wrong");
Expand Down

0 comments on commit d41fc6f

Please sign in to comment.