diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-11 14:12:45 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-11 14:12:45 +0800 |
commit | 55019bfbc5c2b7db7a1f861a90d97e6760433e4d (patch) | |
tree | 07a3ecf9e82b942b3428f0eaa7cce947dce743e8 /routers/repo/setting.go | |
parent | 4d6de6c7b9715a6ccce3f09249b47b984b9a1295 (diff) | |
parent | 7d84cc96e8da9f7389f855be4f86864039843e6c (diff) |
merge all login methods
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 4 |
1 files changed, 1 insertions, 3 deletions
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 |