Skip to content

VMR patches containing renames do not restore properly #3410

@premun

Description

@premun

If a patch contains a rename:

diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToAzureDevOpsArtifactsTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToBuildStorageTests.cs
similarity index 94%
rename from src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToAzureDevOpsArtifactsTests.cs
rename to src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToBuildStorageTests.cs
index 330c46a3..0635a612 100644

When we detect a change in a VMR patch (removal), we restore all patched files from the patch.
While doing this, it checks if the files exist -> detects that the patch is adding the file.
But, since it doesn't know about the rename, it doesn't find the file and thinks the patch was adding it, so it removes the file.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions