diff --git a/src/js/git/commands.js b/src/js/git/commands.js index f059b96e..4817b3a9 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -253,7 +253,7 @@ var commandConfig = { source = firstArg; assertIsBranch(engine.origin, source); // get o/master locally if master is specified - destination = engine.origin.refs[source].getPrefixedID(); + destination = engine.origin.resolveID(source).getPrefixedID(); } else { // can't be detached if (engine.getDetachedHead()) { diff --git a/src/js/git/index.js b/src/js/git/index.js index 2f45a024..10b441f6 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -405,7 +405,7 @@ GitEngine.prototype.makeBranchIfNeeded = function(branchName) { }; GitEngine.prototype.makeRemoteBranchForRemote = function(branchName) { - var target = this.origin.refs[branchName].get('target'); + var target = this.origin.resolveID(branchName).get('target'); var originTarget = this.findCommonAncestorWithRemote( target.get('id') ); @@ -1313,7 +1313,7 @@ GitEngine.prototype.fetchCore = function(sourceDestPairs, options) { // need to get the parents first. since we order by depth, we know // the dependencies are there already var parents = parentIDs.map(function(parentID) { - return this.refs[parentID]; + return this.resolveID(parentID); }, this); return this.makeCommit(parents, id); }.bind(this); @@ -1345,7 +1345,7 @@ GitEngine.prototype.fetchCore = function(sourceDestPairs, options) { chain = chain.then(function() { return this.animationFactory.playHighlightPromiseAnimation( - this.origin.refs[commitJSON.id], + this.origin.resolveID(commitJSON.id), localBranch ); }.bind(this)); @@ -1361,7 +1361,7 @@ GitEngine.prototype.fetchCore = function(sourceDestPairs, options) { chain = chain.then(function() { // update all the destinations sourceDestPairs.forEach(function (pair) { - var ours = this.refs[pair.destination]; + var ours = this.resolveID(pair.destination); var theirCommitID = this.origin.getCommitFromRef(pair.source).get('id'); // by definition we just made the commit with this id, // so we can grab it now