big refactor looking a lot better now

This commit is contained in:
Peter Cottle 2013-07-28 12:12:00 -07:00
parent e422bdb181
commit 0aadae766f
12 changed files with 1539 additions and 1355 deletions

View file

@ -2,6 +2,7 @@ var _ = require('underscore');
var intl = require('../intl');
var GitCommands = require('../git/commands');
var Commands = require('../commands');
var Errors = require('../util/errors');
var GitError = Errors.GitError;
@ -26,7 +27,7 @@ DisabledMap.prototype.getInstantCommands = function() {
};
_.each(this.disabledMap, function(val, disabledCommand) {
var gitRegex = GitCommands.regexMap[disabledCommand];
var gitRegex = Commands.getRegexMap()[disabledCommand];
if (!gitRegex) {
throw new Error('wuttttt this disbaled command' + disabledCommand +
' has no regex matching');