We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f92bd6 commit 014de7fCopy full SHA for 014de7f
1 file changed
src/extension.ts
@@ -126,11 +126,13 @@ export function activate(context: vscode.ExtensionContext) {
126
return;
127
}
128
129
- const gitPath = path.join(rootPath, filePath);
+ const gitPath = path.isAbsolute(filePath) ? filePath : path.join(rootPath, filePath);
130
+ const fileUri = vscode.Uri.file(gitPath);
131
const encode = (ref: string) =>
- vscode.Uri.parse(
132
- `git:${gitPath}?${encodeURIComponent(JSON.stringify({ path: gitPath, ref }))}`
133
- );
+ fileUri.with({
+ scheme: 'git',
134
+ query: JSON.stringify({ path: fileUri.fsPath, ref })
135
+ });
136
137
const left = encode(`${pick.hash}^`);
138
const right = encode(pick.hash);
0 commit comments