From 807b1f1ea36b69d67ce8acf9b1deb6fac5a2879a Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 23 May 2017 01:30:16 -0400 Subject: [PATCH] Fixes #73 - doesn't work with Chinese filenames --- src/git/git.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/git/git.ts b/src/git/git.ts index bd70779..b99a143 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -23,6 +23,10 @@ const defaultStashParams = [`stash`, `list`, `--name-status`, `--full-history`, async function gitCommand(cwd: string, ...args: any[]) { try { + // Fixes https://github.com/eamodio/vscode-gitlens/issues/73 + // See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x + args.splice(0, 0, '-c', 'core.quotepath=false'); + const s = await spawnPromise(git.path, args, { cwd: cwd }); Logger.log('git', ...args, ` cwd='${cwd}'`); return s;