mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
fixes #24883
This commit is contained in:
@@ -905,7 +905,7 @@ export class Repository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async buffer(object: string): Promise<Buffer> {
|
async buffer(object: string): Promise<Buffer> {
|
||||||
const child = this.stream(['show', object]);
|
const child = this.stream(['show', '--textconv', object]);
|
||||||
|
|
||||||
if (!child.stdout) {
|
if (!child.stdout) {
|
||||||
return Promise.reject<Buffer>('Can\'t open file from git');
|
return Promise.reject<Buffer>('Can\'t open file from git');
|
||||||
@@ -978,7 +978,7 @@ export class Repository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> {
|
async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> {
|
||||||
const child = await this.stream(['show', object]);
|
const child = await this.stream(['show', '--textconv', object]);
|
||||||
const buffer = await readBytes(child.stdout!, 4100);
|
const buffer = await readBytes(child.stdout!, 4100);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user