mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix pull/push when no tracked branch
This commit is contained in:
parent
407123a280
commit
1377439bb0
@ -522,11 +522,12 @@ Project.prototype.pull = function (user,remoteBranchName,setRemote) {
|
|||||||
var self = this;
|
var self = this;
|
||||||
if (setRemote) {
|
if (setRemote) {
|
||||||
return gitTools.setUpstream(this.path, remoteBranchName).then(function() {
|
return gitTools.setUpstream(this.path, remoteBranchName).then(function() {
|
||||||
return gitTools.pull(self.path, null, null, authCache.get(self.name,this.remotes[this.currentRemote].fetch,username));
|
self.currentRemote = self.parseRemoteBranch(remoteBranchName).remote;
|
||||||
|
return gitTools.pull(self.path, null, null, authCache.get(self.name,self.remotes[self.currentRemote].fetch,username));
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
var remote = this.parseRemoteBranch(remoteBranchName);
|
var remote = this.parseRemoteBranch(remoteBranchName);
|
||||||
return gitTools.pull(this.path, remote.remote, remote.branch, authCache.get(this.name,this.remotes[this.currentRemote].fetch,username));
|
return gitTools.pull(this.path, remote.remote, remote.branch, authCache.get(this.name,this.remotes[remote.remote||self.currentRemote].fetch,username));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user