diff --git a/src/js/git/headless.js b/src/js/git/headless.js index 0e2e1401..37f2cb09 100644 --- a/src/js/git/headless.js +++ b/src/js/git/headless.js @@ -67,12 +67,16 @@ HeadlessGit.prototype.init = function() { this.gitEngine.init(); }; -HeadlessGit.prototype.sendCommand = function(value) { +HeadlessGit.prototype.sendCommand = function(value, cb) { + var deferred = Q.defer(); + var chain = deferred.promise; util.splitTextCommand(value, function(commandStr) { var commandObj = new Command({ rawStr: commandStr }); - this.gitEngine.dispatch(commandObj, Q.defer()); + var thisDeferred = Q.defer(); + this.gitEngine.dispatch(commandObj, thisDeferred); + chain = chain.then(thisPromise); }, this); }; diff --git a/todo.txt b/todo.txt index 4b1326ab..5de89489 100644 --- a/todo.txt +++ b/todo.txt @@ -6,7 +6,6 @@ Before everything else: ~~~~~~~~~~~~~~~~~~~~~~~~~~ [ ] increase test coverage over everything - unit and integration, but mostly for git operations -[ ] green refactor tree compare to have map Intl TODO ~~~~~~~~~~~~~~~~~~~ @@ -34,7 +33,6 @@ Origin things: Medium things: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -[ ] add visuals and text to show compare method Cases to handle / things to edit ======================= @@ -54,6 +52,8 @@ Ideas for cleaning Done things: (I only started this on Dec 17th 2012 to get a better sense of what was done) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[x] add visuals and text to show compare method +[x] green refactor tree compare to have map [x] fix tests by stubbing out animation factory to resolve promises [x] better git clone and fake teamwork anywhere [x] git pull animation