mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
AWESOME origin compare within trees and levels, visualizations down, finish animation chain fixed, everything is awesome here. ready fororigin levels
This commit is contained in:
parent
7a00bd09f6
commit
c4ae821cef
12 changed files with 203 additions and 60 deletions
|
@ -69,6 +69,31 @@ var regexMap = {
|
|||
'git clone': /^git +clone *?$/
|
||||
};
|
||||
|
||||
/**
|
||||
* Maintain this list to keep track of which commands we track
|
||||
* for the "git golf" minigame
|
||||
*/
|
||||
var commandsThatCount = (function() {
|
||||
var toCount = [
|
||||
'git commit',
|
||||
'git checkout',
|
||||
'git rebase',
|
||||
'git reset',
|
||||
'git branch',
|
||||
'git revert',
|
||||
'git merge',
|
||||
'git clone',
|
||||
'git cherry-pick'
|
||||
];
|
||||
var whichCountMap = {};
|
||||
_.each(toCount, function(method) {
|
||||
if (!regexMap[method]) { throw new Error('wut no regex'); }
|
||||
|
||||
whichCountMap[method] = regexMap[method];
|
||||
});
|
||||
return whichCountMap;
|
||||
})();
|
||||
|
||||
var parse = function(str) {
|
||||
var method;
|
||||
var options;
|
||||
|
@ -200,6 +225,7 @@ GitOptionParser.prototype.explodeAndSet = function() {
|
|||
};
|
||||
|
||||
exports.shortcutMap = shortcutMap;
|
||||
exports.commandsThatCount = commandsThatCount;
|
||||
exports.instantCommands = instantCommands;
|
||||
exports.parse = parse;
|
||||
exports.regexMap = regexMap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue