mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 07:28:35 +02:00
yay all tests pass and big git pull update
This commit is contained in:
parent
99bf9bacd3
commit
b8cf7f75c0
3 changed files with 57 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue