mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
Undo button functionality Issue #40
This commit is contained in:
parent
e94710ca64
commit
c5a3f866ab
9 changed files with 144 additions and 12 deletions
|
@ -257,6 +257,7 @@ var Level = Sandbox.extend({
|
|||
initGitShim: function(options) {
|
||||
// ok we definitely want a shim here
|
||||
this.gitShim = new GitShim({
|
||||
beforeCB: _.bind(this.beforeCommandCB, this),
|
||||
afterCB: _.bind(this.afterCommandCB, this),
|
||||
afterDeferHandler: _.bind(this.afterCommandDefer, this)
|
||||
});
|
||||
|
@ -283,6 +284,11 @@ var Level = Sandbox.extend({
|
|||
return myRegexMap;
|
||||
},
|
||||
|
||||
undo: function() {
|
||||
this.gitCommandsIssued.pop();
|
||||
Level.__super__.undo.apply(this, arguments);
|
||||
},
|
||||
|
||||
afterCommandCB: function(command) {
|
||||
var matched = false;
|
||||
_.each(this.commandsThatCount, function(regex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue