Resolves #435 -- pushing tags

This commit is contained in:
Peter Cottle 2017-07-30 14:23:23 -07:00
parent 97e6eef62f
commit 789e2efda1

View file

@ -1052,6 +1052,12 @@ GitEngine.prototype.push = function(options) {
}
var sourceBranch = this.refs[options.source];
if (sourceBranch && sourceBranch.attributes.type === 'tag') {
throw new GitError({
msg: intl.todo('Tags are not allowed as sources for pushing'),
});
}
if (!this.origin.refs[options.destination]) {
this.makeBranchOnOriginAndTrack(
options.destination,