File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2460,7 +2460,20 @@ export class CommandCenter {
2460
2460
}
2461
2461
2462
2462
const remoteTagPicks = async ( ) : Promise < TagItem [ ] | QuickPickItem [ ] > => {
2463
- const remoteTags = await repository . getRemoteRefs ( remoteName , { tags : true } ) ;
2463
+ const remoteTagsRaw = await repository . getRemoteRefs ( remoteName , { tags : true } ) ;
2464
+
2465
+ // Deduplicate annotated and lightweight tags
2466
+ const remoteTagNames = new Set < string > ( ) ;
2467
+ const remoteTags : Ref [ ] = [ ] ;
2468
+
2469
+ for ( const tag of remoteTagsRaw ) {
2470
+ const tagName = ( tag . name ?? '' ) . replace ( / \^ { } $ / , '' ) ;
2471
+ if ( ! remoteTagNames . has ( tagName ) ) {
2472
+ remoteTags . push ( { ...tag , name : tagName } ) ;
2473
+ remoteTagNames . add ( tagName ) ;
2474
+ }
2475
+ }
2476
+
2464
2477
return remoteTags . length === 0 ? [ { label : l10n . t ( '$(info) Remote "{0}" has no tags.' , remoteName ) } ] : remoteTags . map ( ref => new TagItem ( ref ) ) ;
2465
2478
} ;
2466
2479
You can’t perform that action at this time.
0 commit comments