11import { Disposable , env , EventEmitter , ProgressLocation , Uri , window , workspace } from 'vscode' ;
2- import type { StoredDeepLinkContext } from '../../constants' ;
2+ import type { StoredDeepLinkContext , StoredNamedRef } from '../../constants' ;
33import { Commands } from '../../constants' ;
44import type { Container } from '../../container' ;
55import { getBranchNameWithoutRemote } from '../../git/models/branch' ;
@@ -691,14 +691,14 @@ export class DeepLinkService implements Disposable {
691691 async copyDeepLinkUrl (
692692 repoPath : string ,
693693 remoteUrl : string ,
694- compareRef ?: string ,
695- compareWithRef ?: string ,
694+ compareRef ?: StoredNamedRef ,
695+ compareWithRef ?: StoredNamedRef ,
696696 ) : Promise < void > ;
697697 async copyDeepLinkUrl (
698698 refOrRepoPath : string | GitReference ,
699699 remoteUrl : string ,
700- compareRef ?: string ,
701- compareWithRef ?: string ,
700+ compareRef ?: StoredNamedRef ,
701+ compareWithRef ?: StoredNamedRef ,
702702 ) : Promise < void > {
703703 const url = await ( typeof refOrRepoPath === 'string'
704704 ? this . generateDeepLinkUrl ( refOrRepoPath , remoteUrl , compareRef , compareWithRef )
@@ -710,14 +710,14 @@ export class DeepLinkService implements Disposable {
710710 async generateDeepLinkUrl (
711711 repoPath : string ,
712712 remoteUrl : string ,
713- compareRef ?: string ,
714- compareWithRef ?: string ,
713+ compareRef ?: StoredNamedRef ,
714+ compareWithRef ?: StoredNamedRef ,
715715 ) : Promise < URL > ;
716716 async generateDeepLinkUrl (
717717 refOrRepoPath : string | GitReference ,
718718 remoteUrl : string ,
719- compareRef ?: string ,
720- compareWithRef ?: string ,
719+ compareRef ?: StoredNamedRef ,
720+ compareWithRef ?: StoredNamedRef ,
721721 ) : Promise < URL > {
722722 const repoPath = typeof refOrRepoPath !== 'string' ? refOrRepoPath . repoPath : refOrRepoPath ;
723723 let repoId ;
@@ -751,8 +751,8 @@ export class DeepLinkService implements Disposable {
751751
752752 if ( compareRef != null && compareWithRef != null ) {
753753 targetType = DeepLinkType . Comparison ;
754- targetId = compareRef ;
755- compareWithTargetId = compareWithRef ;
754+ targetId = compareRef . label ?? compareRef . ref ;
755+ compareWithTargetId = compareWithRef . label ?? compareWithRef . ref ;
756756 }
757757
758758 const schemeOverride = configuration . get ( 'deepLinks.schemeOverride' ) ;
0 commit comments