yay all tests pass and big git pull update

This commit is contained in:
Peter Cottle 2013-10-22 10:56:35 -07:00
parent 99bf9bacd3
commit b8cf7f75c0
3 changed files with 57 additions and 18 deletions

View file

@ -1214,18 +1214,21 @@ GitEngine.prototype.fetchCore = function(sourceDestPairs, options) {
GitEngine.prototype.pull = function(options) {
options = options || {};
var localBranch = this.getOneBeforeCommit('HEAD');
var remoteBranch = this.refs[options.source];
// no matter what fetch
var pendingFetch = this.fetch({
dontResolvePromise: true,
dontThrowOnNoFetch: true
dontThrowOnNoFetch: true,
source: options.source,
destination: options.destination
});
var destBranch = this.refs[options.destination];
// then either rebase or merge
if (options.isRebase) {
this.pullFinishWithRebase(pendingFetch, localBranch, remoteBranch);
this.pullFinishWithRebase(pendingFetch, localBranch, destBranch);
} else {
this.pullFinishWithMerge(pendingFetch, localBranch, remoteBranch);
this.pullFinishWithMerge(pendingFetch, localBranch, destBranch);
}
};