From ced3037e006e2bc2254bfeb50ff9071f32a08856 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Thu, 17 Nov 2022 18:49:26 +0300 Subject: [PATCH 1/2] fix(git): Don't quote unicode paths --- lib/util/git/config.ts | 1 + lib/util/git/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/util/git/config.ts b/lib/util/git/config.ts index 507d10bfb088a3..12bc54b8ac7c77 100644 --- a/lib/util/git/config.ts +++ b/lib/util/git/config.ts @@ -23,6 +23,7 @@ export function simpleGitConfig(): Partial { onClose: true, onExit: false, }, + config: ['core.quotePath=false'], }; // https://github.com/steveukx/git-js/pull/591 const gitTimeout = GlobalConfig.get('gitTimeout'); diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index 53fec36f6be043..696f2dc602bd32 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -237,8 +237,8 @@ export async function initRepo(args: StorageConfig): Promise { const { localDir } = GlobalConfig.get(); git = simpleGit(localDir, simpleGitConfig()).env({ ...process.env, - LANG: 'C', - LC_ALL: 'C', + LANG: 'C.UTF-8', + LC_ALL: 'C.UTF-8', }); gitInitialized = false; submodulesInitizialized = false; From 66f2dcf0c2aa172fbcf7884015e1cdeb80c89692 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Thu, 17 Nov 2022 22:15:16 +0300 Subject: [PATCH 2/2] Fix test --- lib/util/git/config.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util/git/config.spec.ts b/lib/util/git/config.spec.ts index 89327a7fa34fac..1e51d6f827c44c 100644 --- a/lib/util/git/config.spec.ts +++ b/lib/util/git/config.spec.ts @@ -9,6 +9,7 @@ describe('util/git/config', () => { it('uses "close" events, ignores "exit" events from child processes', () => { expect(simpleGitConfig()).toEqual({ completion: { onClose: true, onExit: false }, + config: ['core.quotePath=false'], }); }); @@ -19,6 +20,7 @@ describe('util/git/config', () => { timeout: { block: 50000, }, + config: ['core.quotePath=false'], }); }); });