summaryrefslogtreecommitdiffstats
path: root/routers/repo/setting.go
diff options
context:
space:
mode:
authorslene <vslene@gmail.com>2014-05-10 11:14:24 +0800
committerslene <vslene@gmail.com>2014-05-10 11:14:24 +0800
commit7d84cc96e8da9f7389f855be4f86864039843e6c (patch)
tree01e490472f6c9448b930727dc2c83c78c058f5f2 /routers/repo/setting.go
parent2eabeba6b76d906664defe4392a7ca2640128712 (diff)
downloadgitea-7d84cc96e8da9f7389f855be4f86864039843e6c.tar.gz
gitea-7d84cc96e8da9f7389f855be4f86864039843e6c.zip
update with git api
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r--routers/repo/setting.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index d7c273c63a..89c7cb486e 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -10,8 +10,6 @@ import (
"github.com/go-martini/martini"
- "github.com/gogits/git"
-
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/auth"
"github.com/gogits/gogs/modules/base"
@@ -57,7 +55,7 @@ func SettingPost(ctx *middleware.Context, form auth.RepoSettingForm) {
br := form.Branch
- if git.IsBranchExist(models.RepoPath(ctx.User.Name, ctx.Repo.Repository.Name), br) {
+ if ctx.Repo.GitRepo.IsBranchExist(br) {
ctx.Repo.Repository.DefaultBranch = br
}
ctx.Repo.Repository.Description = form.Description