mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-01 02:04:26 +02:00
add a vcs level to regex map
This commit is contained in:
parent
3abe620cf1
commit
54414925fa
4 changed files with 63 additions and 36 deletions
|
@ -26,7 +26,10 @@ DisabledMap.prototype.getInstantCommands = function() {
|
|||
};
|
||||
|
||||
_.each(this.disabledMap, function(val, disabledCommand) {
|
||||
var gitRegex = GitCommands.commands.getRegexMap()[disabledCommand];
|
||||
// XXX get hold of vcs from disabledMap
|
||||
var vcs = 'git';
|
||||
disabledCommand = disabledCommand.slice(vcs.length + 1);
|
||||
var gitRegex = GitCommands.commands.getRegexMap()[vcs][disabledCommand];
|
||||
if (!gitRegex) {
|
||||
throw new Error('wuttttt this disbaled command' + disabledCommand +
|
||||
' has no regex matching');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue