Merging now worksgit status! and have some nice graph exploration

This commit is contained in:
Peter Cottle 2012-09-12 23:48:19 -07:00
parent af76c03ad1
commit 6cb4c6b4a1
7 changed files with 206 additions and 52 deletions

View file

@ -12,11 +12,11 @@ function Command(str) {
Command.prototype.getShortcutMap = function() {
return {
'git commit': /^gc/,
'git add': /^ga/,
'git checkout': /^gchk/,
'git rebase': /^gr/,
'git branch': /^gb/
'git commit': /^gc($|\s)/,
'git add': /^ga($|\s)/,
'git checkout': /^gchk($|\s)/,
'git rebase': /^gr($|\s)/,
'git branch': /^gb($|\s)/
};
};
@ -30,7 +30,8 @@ Command.prototype.getRegexMap = function() {
rebase: /^rebase($|\s)/,
reset: /^reset($|\s)/,
branch: /^branch($|\s)/,
revert: /^revert($|\s)/
revert: /^revert($|\s)/,
merge: /^merge($|\s)/
};
};
@ -78,7 +79,7 @@ Command.prototype.parse = function(str) {
_.each(this.getShortcutMap(), function(regex, method) {
var results = regex.exec(str);
if (results) {
str = method + str.slice(results[0].length);
str = method + ' ' + str.slice(results[0].length);
}
});
@ -155,6 +156,7 @@ OptionParser.prototype.getMasterOptionMap = function() {
reset: {
'--hard': false,
},
merge: {},
rebase: {},
revert: {}
};