diff --git a/build/bundle.js b/build/bundle.js index f0424584..f164421b 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -10422,14 +10422,16 @@ var instantCommands = [ ]; var parse = function(str) { + var vcs; var method; var options; // see if we support this particular command _.each(commands.getRegexMap(), function(regex, thisMethod) { if (regex.exec(str)) { - options = str.slice(thisMethod.length + 1); - method = thisMethod.slice('git '.length); + vcs = 'git'; // XXX get from regex map + options = str.slice(vcs.length + 1 + thisMethod.length + 1); + method = thisMethod.slice(vcs.length + 1); } }); @@ -10444,6 +10446,7 @@ var parse = function(str) { toSet: { generalArgs: parsedOptions.generalArgs, supportedMap: parsedOptions.supportedMap, + vcs: vcs, method: method, options: options, eventName: 'processGitCommand' @@ -24318,14 +24321,16 @@ var instantCommands = [ ]; var parse = function(str) { + var vcs; var method; var options; // see if we support this particular command _.each(commands.getRegexMap(), function(regex, thisMethod) { if (regex.exec(str)) { - options = str.slice(thisMethod.length + 1); - method = thisMethod.slice('git '.length); + vcs = 'git'; // XXX get from regex map + options = str.slice(vcs.length + 1 + thisMethod.length + 1); + method = thisMethod.slice(vcs.length + 1); } }); @@ -24340,6 +24345,7 @@ var parse = function(str) { toSet: { generalArgs: parsedOptions.generalArgs, supportedMap: parsedOptions.supportedMap, + vcs: vcs, method: method, options: options, eventName: 'processGitCommand' diff --git a/src/js/git/commands.js b/src/js/git/commands.js index 640b88cd..2517e853 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -555,14 +555,16 @@ var instantCommands = [ ]; var parse = function(str) { + var vcs; var method; var options; // see if we support this particular command _.each(commands.getRegexMap(), function(regex, thisMethod) { if (regex.exec(str)) { + vcs = 'git'; // XXX get from regex map options = str.slice(thisMethod.length + 1); - method = thisMethod.slice('git '.length); + method = thisMethod.slice(vcs.length + 1); } }); @@ -577,6 +579,7 @@ var parse = function(str) { toSet: { generalArgs: parsedOptions.generalArgs, supportedMap: parsedOptions.supportedMap, + vcs: vcs, method: method, options: options, eventName: 'processGitCommand'