Resolves #766 -- resolve ID on push function as well

This commit is contained in:
Peter Cottle 2020-12-30 08:32:58 -07:00
parent 76ea2e8694
commit a530dcbb16

View file

@ -1065,7 +1065,7 @@ GitEngine.prototype.push = function(options) {
return;
}
var sourceBranch = this.refs[options.source];
var sourceBranch = this.resolveID(options.source);
if (sourceBranch && sourceBranch.attributes.type === 'tag') {
throw new GitError({
msg: intl.todo('Tags are not allowed as sources for pushing'),
@ -1083,7 +1083,7 @@ GitEngine.prototype.push = function(options) {
this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
this.animationFactory.playRefreshAnimation(this.gitVisuals);
}
var branchOnRemote = this.origin.refs[options.destination];
var branchOnRemote = this.origin.resolveID(options.destination);
var sourceLocation = this.resolveID(options.source || 'HEAD');
// first check if this is even allowed by checking the sync between