mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
vscode.dev links should be head links (#179074)
This commit is contained in:
@@ -149,7 +149,7 @@ export function getLink(gitAPI: GitAPI, useSelection: boolean, hostPrefix?: stri
|
||||
return;
|
||||
}
|
||||
|
||||
const blobSegment = (gitRepo.state.HEAD?.ahead === 0) ? `/blob/${linkType === 'headlink' ? gitRepo.state.HEAD.name : gitRepo.state.HEAD?.commit}` : '';
|
||||
const blobSegment = gitRepo.state.HEAD ? (`/blob/${linkType === 'headlink' && gitRepo.state.HEAD.name ? gitRepo.state.HEAD.name : gitRepo.state.HEAD?.commit}`) : '';
|
||||
const fileSegments = fileAndPosition.type === LinkType.File
|
||||
? (useSelection ? `${uri.path.substring(gitRepo.rootUri.path.length)}${useRange ? rangeString(fileAndPosition.range) : ''}` : '')
|
||||
: (useSelection ? `${uri.path.substring(gitRepo.rootUri.path.length)}${useRange ? notebookCellRangeString(fileAndPosition.cellIndex, fileAndPosition.range) : ''}` : '');
|
||||
|
||||
Reference in New Issue
Block a user