mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 23:48:34 +02:00
Resolves #435 -- pushing tags
This commit is contained in:
parent
97e6eef62f
commit
789e2efda1
1 changed files with 6 additions and 0 deletions
|
@ -1052,6 +1052,12 @@ GitEngine.prototype.push = function(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var sourceBranch = this.refs[options.source];
|
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]) {
|
if (!this.origin.refs[options.destination]) {
|
||||||
this.makeBranchOnOriginAndTrack(
|
this.makeBranchOnOriginAndTrack(
|
||||||
options.destination,
|
options.destination,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue