Skip to content

Commit c664350

Browse files
authored
Add GIT_OPTIONAL_LOCKS=0 to all Git calls (#4440)
1 parent e60eb8f commit c664350

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extension/src/cli/git/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const getOptions = ({
1717
}
1818

1919
if (env) {
20-
options.env = env
20+
options.env = { ...env, GIT_OPTIONAL_LOCKS: '0' }
2121
}
2222

2323
return options

extension/src/cli/git/reader.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('GitReader', () => {
5454
expect(mockedCreateProcess).toHaveBeenCalledWith({
5555
args: ['branch'],
5656
cwd,
57-
env: { LANG: 'en_US.UTF-8' },
57+
env: { GIT_OPTIONAL_LOCKS: '0', LANG: 'en_US.UTF-8' },
5858
executable: 'git'
5959
})
6060
})

0 commit comments

Comments
 (0)