提交 9ad949b9 编写于 作者: J Joao Moreno

🐛 fixes #24521

上级 eae37399
......@@ -100,7 +100,7 @@ export class GitSCMProvider {
return;
}
return toGitUri(uri, '');
return toGitUri(uri, '', true);
}
private onDidModelChange(): void {
......
......@@ -12,11 +12,12 @@ export function fromGitUri(uri: Uri): { path: string; ref: string; } {
}
// As a mitigation for extensions like ESLint showing warnings and errors
// for git URIs, let's change the file extension of these uris to .git.
export function toGitUri(uri: Uri, ref: string): Uri {
// for git URIs, let's change the file extension of these uris to .git,
// when `replaceFileExtension` is true.
export function toGitUri(uri: Uri, ref: string, replaceFileExtension = false): Uri {
return uri.with({
scheme: 'git',
path: `${uri.path}.git`,
path: replaceFileExtension ? `${uri.path}.git` : uri.path,
query: JSON.stringify({
path: uri.fsPath,
ref
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册