set vcs separately

This commit is contained in:
Siddharth Agarwal 2013-07-31 00:01:54 -07:00
parent 3c1887f1d0
commit b71e794e8e
2 changed files with 14 additions and 5 deletions

View file

@ -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'