Skip to content

Commit 026f687

Browse files
committed
Revert "Escape spaces in git-path folder setting" because #147. Ref #135.
Fixes #147 This reverts commit c502845.
1 parent 65c9893 commit 026f687

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

src/git.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,12 @@ module.exports.get_git = function(EXT_ID, logger, { on_repo_external_state_chang
119119
throw new Error(`Tried to run 'git ${args.slice(0, 25)}' but repo not loaded (yet?): ${cwd}`)
120120
}
121121
try {
122-
let { stdout } = await exec(
123-
// cmd may include spaces such as C:\Program Files, while args is passed insecurely
124-
`"${cmd.replaceAll('\\', '\\\\').replaceAll('"', '\\"')}"` +
125-
` ${args}`, {
126-
cwd,
127-
// 35 MB. For scale, Linux kernel git graph (1 mio commits) in extension format
128-
// is 538 MB or 7.4 MB for the first 15k commits
129-
maxBuffer: 1024 * 1024 * 35,
130-
})
122+
let { stdout } = await exec(cmd + ' ' + args, {
123+
cwd,
124+
// 35 MB. For scale, Linux kernel git graph (1 mio commits) in extension format
125+
// is 538 MB or 7.4 MB for the first 15k commits
126+
maxBuffer: 1024 * 1024 * 35,
127+
})
131128
last_git_execution = Date.now()
132129
return stdout
133130
} catch (error) {

0 commit comments

Comments
 (0)