aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_branch.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-03-11 11:44:58 +0800
committerGitHub <noreply@github.com>2019-03-11 11:44:58 +0800
commit4334fe754e4a338a13073f649707acd26d1f4a12 (patch)
treecea77d699b0af6b9d3c3fab591514a889c869a4c /models/repo_branch.go
parent2315019fefb07dfe08e4ecefa199fd947c0c79b8 (diff)
downloadgitea-4334fe754e4a338a13073f649707acd26d1f4a12.tar.gz
gitea-4334fe754e4a338a13073f649707acd26d1f4a12.zip
update git vendor to fix wrong release commit id and add migrations (#6224)
* update git vendor to fix wrong release commit id and add migrations * fix count * fix migration release * fix tests
Diffstat (limited to 'models/repo_branch.go')
-rw-r--r--models/repo_branch.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/models/repo_branch.go b/models/repo_branch.go
index 88417cbd36..c4013dfb82 100644
--- a/models/repo_branch.go
+++ b/models/repo_branch.go
@@ -110,10 +110,6 @@ func (repo *Repository) CheckBranchName(name string) error {
return err
}
- if _, err := gitRepo.GetTag(name); err == nil {
- return ErrTagAlreadyExists{name}
- }
-
branches, err := repo.GetBranches()
if err != nil {
return err
@@ -127,6 +123,11 @@ func (repo *Repository) CheckBranchName(name string) error {
return ErrBranchNameConflict{branch.Name}
}
}
+
+ if _, err := gitRepo.GetTag(name); err == nil {
+ return ErrTagAlreadyExists{name}
+ }
+
return nil
}