diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index c8aeee8..03589d7 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -1889,10 +1889,7 @@ export class GitProviderService implements Disposable { return provider.getOrOpenScmRepository(path); } - static getEncoding(repoPath: string, fileName: string): string; - static getEncoding(uri: Uri): string; - static getEncoding(repoPathOrUri: string | Uri, fileName?: string): string { - const uri = typeof repoPathOrUri === 'string' ? GitUri.resolveToUri(fileName!, repoPathOrUri) : repoPathOrUri; + static getEncoding(uri: Uri): string { const encoding = configuration.getAny('files.encoding', uri); return encoding != null && encodingExists(encoding) ? encoding : 'utf8'; }