File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ import { Repository } from "../api/git";
99
1010const exec = util . promisify ( _exec ) ;
1111
12+ // Ensure Git will show special characters literally without quoting the string and escaping characters.
13+ const QUOTE_PATH = "-c 'core.quotePath=false'"
14+
1215const DIFF_INDEX_CMD = "diff-index" ;
1316const DIFF_INDEX_OPTIONS = [
1417 "--name-status" ,
@@ -21,7 +24,7 @@ const DIFF_INDEX_OPTIONS = [
2124 * Run a `git` subcommand and return the result, with stdout and stderr available.
2225 */
2326function _execute ( cwd : string , subcommand : string , options : string [ ] = [ ] ) {
24- const command = `git -c 'core.quotePath=false' ${ subcommand } ${ options . join ( " " ) } ` ;
27+ const command = `git ${ QUOTE_PATH } ${ subcommand } ${ options . join ( " " ) } ` ;
2528
2629 console . debug ( `Running command: ${ command } , cwd: ${ cwd } ` ) ;
2730
You can’t perform that action at this time.
0 commit comments