mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
before tests
This commit is contained in:
parent
f34c606d87
commit
565142048c
4 changed files with 20 additions and 31 deletions
|
@ -33,12 +33,6 @@ var CommandEntryCollection = Backbone.Collection.extend({
|
|||
localStorage: (Backbone.LocalStorage) ? new Backbone.LocalStorage('CommandEntries') : null
|
||||
});
|
||||
|
||||
if (Backbone.LocalStorage) {
|
||||
console.log('local storage there');
|
||||
} else {
|
||||
console.log('not htere');
|
||||
}
|
||||
|
||||
var CommandBuffer = Backbone.Model.extend({
|
||||
defaults: {
|
||||
collection: null
|
||||
|
|
|
@ -116,7 +116,7 @@ var Command = Backbone.Model.extend({
|
|||
return {
|
||||
'git commit': /^gc($|\s)/,
|
||||
'git add': /^ga($|\s)/,
|
||||
'git checkout': /^gchk($|\s)/,
|
||||
'git checkout': /^go($|\s)/,
|
||||
'git rebase': /^gr($|\s)/,
|
||||
'git branch': /^gb($|\s)/
|
||||
};
|
||||
|
@ -224,6 +224,7 @@ var Command = Backbone.Model.extend({
|
|||
var regex = tuple[0];
|
||||
var results = regex.exec(str);
|
||||
if (results) {
|
||||
// this will throw a result
|
||||
tuple[1](results);
|
||||
}
|
||||
});
|
||||
|
@ -235,7 +236,8 @@ var Command = Backbone.Model.extend({
|
|||
if (results) {
|
||||
str = method + ' ' + str.slice(results[0].length);
|
||||
}
|
||||
});
|
||||
this.set('rawStr', str);
|
||||
}, this);
|
||||
|
||||
// see if begins with git
|
||||
if (str.slice(0,3) !== 'git') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue