diff --git a/lib/git/git.js b/lib/git/git.js index 78bfce2..746d181 100644 --- a/lib/git/git.js +++ b/lib/git/git.js @@ -226,7 +226,7 @@ Git.prototype.call_git = function(prefix, command, gitargs, postfix, options, ar // Join the arguments var final_arguments = option_arguments.concat(ext_args); // Build a call - call_string = prefix + Git.git_binary + ' --git-dir="'+ this.git_directory + '" ' + ext_git_args + command.toString().replace(/_/, '-') + ' ' + final_arguments.join(" ") + postfix; + call_string = prefix + Git.git_binary + ' --git-dir="' + shell_escape(this.git_directory) + '" ' + ext_git_args + command.toString().replace(/_/, '-') + ' ' + final_arguments.join(" ") + postfix; } // Execute the function this.exec(call_string, { encoding: 'utf8', timeout: timeout, killSignal: 'SIGKILL'}, callback);