Skip to content

Commit

Permalink
fix(git): Don't quote unicode paths (#18963)
Browse files Browse the repository at this point in the history
Fixes #18805
  • Loading branch information
zharinov committed Nov 18, 2022
1 parent d1d6feb commit f31dacb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/util/git/config.spec.ts
Expand Up @@ -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'],
});
});

Expand All @@ -19,6 +20,7 @@ describe('util/git/config', () => {
timeout: {
block: 50000,
},
config: ['core.quotePath=false'],
});
});
});
1 change: 1 addition & 0 deletions lib/util/git/config.ts
Expand Up @@ -23,6 +23,7 @@ export function simpleGitConfig(): Partial<SimpleGitOptions> {
onClose: true,
onExit: false,
},
config: ['core.quotePath=false'],
};
// https://github.com/steveukx/git-js/pull/591
const gitTimeout = GlobalConfig.get('gitTimeout');
Expand Down
4 changes: 2 additions & 2 deletions lib/util/git/index.ts
Expand Up @@ -237,8 +237,8 @@ export async function initRepo(args: StorageConfig): Promise<void> {
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;
Expand Down

0 comments on commit f31dacb

Please sign in to comment.