From 7d84cc96e8da9f7389f855be4f86864039843e6c Mon Sep 17 00:00:00 2001 From: slene Date: Sat, 10 May 2014 11:14:24 +0800 Subject: update with git api --- routers/repo/setting.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'routers/repo/setting.go') diff --git a/routers/repo/setting.go b/routers/repo/setting.go index d7c273c6..89c7cb48 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 -- cgit v1.2.3