Skip to content

Clean up clones before usage#4204

Merged
premun merged 2 commits into
dotnet:mainfrom
premun:prvysoky/clean-repos
Dec 3, 2024
Merged

Clean up clones before usage#4204
premun merged 2 commits into
dotnet:mainfrom
premun:prvysoky/clean-repos

Conversation

@premun

@premun premun commented Dec 2, 2024

Copy link
Copy Markdown
Member

@premun premun requested a review from dkurepa December 2, 2024 11:33
{
_logger.LogWarning("Failed to clean up {clonePath}, re-cloning", clonePath);
_fileSystem.DeleteDirectory(clonePath, recursive: true);
return await PrepareCloneInternal(remoteUri, dirName, performCleanup: true, cancellationToken);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we need to reset a freshly cloned repo? it should be a no op

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it really clones again, it will no go this route anymore but rather through line 139 so it does not really matter what we put there. But I assumed true is better in case of whatever other new case in the future.

@premun premun merged commit eb59b40 into dotnet:main Dec 3, 2024
@premun premun deleted the prvysoky/clean-repos branch December 3, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants