GitProtocolHandler - update supported schemes based on the platform (#208730)

This commit is contained in:
Ladislau Szomoru 2024-03-25 23:55:49 +01:00 committed by GitHub
parent 81d996c90e
commit 8d02db45e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,10 +4,13 @@
*--------------------------------------------------------------------------------------------*/
import { UriHandler, Uri, window, Disposable, commands, LogOutputChannel, l10n } from 'vscode';
import { dispose } from './util';
import { dispose, isWindows } from './util';
import * as querystring from 'querystring';
const schemes = new Set(['file', 'git', 'http', 'https', 'ssh']);
const schemes = isWindows ?
new Set(['git', 'http', 'https', 'ssh']) :
new Set(['file', 'git', 'http', 'https', 'ssh']);
const refRegEx = /^$|[~\^:\\\*\s\[\]]|^-|^\.|\/\.|\.\.|\.lock\/|\.lock$|\/$|\.$/;
export class GitProtocolHandler implements UriHandler {