File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ pat is not null
367
367
var builder = ImmutableDictionary . CreateBuilder < BranchIdentity , ImmutableArray < ( string GitRepositoryPath , TfvcItem DownloadSource ) > > ( ) ;
368
368
369
369
var itemsBuilder = ImmutableArray . CreateBuilder < ( string GitRepositoryPath , TfvcItem DownloadSource ) > ( ) ;
370
+ var itemPaths = new HashSet < string > ( StringComparer . OrdinalIgnoreCase ) ;
370
371
371
372
foreach ( var ( branch , mapping ) in branchMappingsInDependentOperationOrder )
372
373
{
@@ -384,11 +385,17 @@ pat is not null
384
385
}
385
386
386
387
if ( mapping . GetGitRepositoryPath ( item . Path ) is { } path )
388
+ {
389
+ if ( ! itemPaths . Add ( path ) )
390
+ throw new InvalidOperationException ( "The same Git repository path is being added with two different TFVC sources." ) ;
391
+
387
392
itemsBuilder . Add ( ( path , item ) ) ;
393
+ }
388
394
}
389
395
390
396
builder . Add ( branch , itemsBuilder . ToImmutable ( ) ) ;
391
397
itemsBuilder . Clear ( ) ;
398
+ itemPaths . Clear ( ) ;
392
399
}
393
400
394
401
return builder . ToImmutable ( ) ;
You can’t perform that action at this time.
0 commit comments