diff --git a/build/bundle.js b/build/bundle.js index a2b05cde..7e38e9e0 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -8121,7 +8121,6 @@ GitEngine.prototype.push = function(options) { GitEngine.prototype.fetch = function(options) { options = options || {}; - var localBranch = this.refs['o/master']; // fetch all local branches var allRemotes = this.branchCollection.filter(function(branch) { @@ -8191,7 +8190,13 @@ GitEngine.prototype.fetch = function(options) { var deferred = Q.defer(); var chain = deferred.promise; + var originBranchSet = this.origin.getUpstreamBranchSet(); _.each(commitsToMake, function(commitJSON) { + // technically we could grab the wrong one here + // but this works for now + var originBranch = originBranchSet[commitJSON.id][0].obj; + var localBranch = this.refs[originBranch.getPrefixedID()]; + chain = chain.then(_.bind(function() { return this.animationFactory.playHighlightPromiseAnimation( this.origin.refs[commitJSON.id], @@ -26566,7 +26571,6 @@ GitEngine.prototype.push = function(options) { GitEngine.prototype.fetch = function(options) { options = options || {}; - var localBranch = this.refs['o/master']; // fetch all local branches var allRemotes = this.branchCollection.filter(function(branch) { @@ -26636,7 +26640,13 @@ GitEngine.prototype.fetch = function(options) { var deferred = Q.defer(); var chain = deferred.promise; + var originBranchSet = this.origin.getUpstreamBranchSet(); _.each(commitsToMake, function(commitJSON) { + // technically we could grab the wrong one here + // but this works for now + var originBranch = originBranchSet[commitJSON.id][0].obj; + var localBranch = this.refs[originBranch.getPrefixedID()]; + chain = chain.then(_.bind(function() { return this.animationFactory.playHighlightPromiseAnimation( this.origin.refs[commitJSON.id], diff --git a/src/js/git/index.js b/src/js/git/index.js index 676a96bf..0d887763 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -901,7 +901,6 @@ GitEngine.prototype.push = function(options) { GitEngine.prototype.fetch = function(options) { options = options || {}; - var localBranch = this.refs['o/master']; // fetch all local branches var allRemotes = this.branchCollection.filter(function(branch) { @@ -937,7 +936,6 @@ GitEngine.prototype.fetch = function(options) { // command simply commits), but we are doing it anyways for correctness commitsToMake = this.getUniqueObjects(commitsToMake); commitsToMake = this.descendSortDepth(commitsToMake); - console.log('ocmmits', commitsToMake); if (commitsToMake.length === 0) { this.command.addWarning(intl.str( @@ -972,7 +970,13 @@ GitEngine.prototype.fetch = function(options) { var deferred = Q.defer(); var chain = deferred.promise; + var originBranchSet = this.origin.getUpstreamBranchSet(); _.each(commitsToMake, function(commitJSON) { + // technically we could grab the wrong one here + // but this works for now + var originBranch = originBranchSet[commitJSON.id][0].obj; + var localBranch = this.refs[originBranch.getPrefixedID()]; + chain = chain.then(_.bind(function() { return this.animationFactory.playHighlightPromiseAnimation( this.origin.refs[commitJSON.id],