Skip to content

Commit 6c6de02

Browse files
authored
Merge pull request #24 from Techsola/fix_path_mapping_for_recursive_branching
Fix path mapping for recursive branching
2 parents 1592d01 + 3b188cb commit 6c6de02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/TfvcMigrator/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,9 @@ private static async IAsyncEnumerable<MappingState> EnumerateMappingStatesAsync(
485485

486486
mapping = PathUtils.IsOrContains(branch.SourceBranchPath, mapping.RootDirectory)
487487
? mapping.ApplyRename(branch.SourceBranchPath, branch.NewBranch.Path)
488-
: mapping.WithSubdirectoryMapping(branch.NewBranch.Path, branch.SourceBranchPath);
488+
: mapping.WithSubdirectoryMapping(
489+
branch.NewBranch.Path,
490+
mapping.SubdirectoryMapping?.TargetDirectory ?? branch.SourceBranchPath);
489491

490492
branchMappings.Add(branch.NewBranch, mapping);
491493
break;

0 commit comments

Comments
 (0)