diff options
author | slene <vslene@gmail.com> | 2014-04-13 09:35:36 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-04-13 09:35:36 +0800 |
commit | 52b4ab2aa589cf892b24e95872cbac7b6e78ed3a (patch) | |
tree | efa6799dd4b78d6e70a28ac9feaa4351836c201a /modules/middleware | |
parent | 9ffa8a40836a5e3341267affbaef08acf4765a74 (diff) | |
download | gitea-52b4ab2aa589cf892b24e95872cbac7b6e78ed3a.tar.gz gitea-52b4ab2aa589cf892b24e95872cbac7b6e78ed3a.zip |
update with new git
Diffstat (limited to 'modules/middleware')
-rw-r--r-- | modules/middleware/repo.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 2a6d300e42..f0a46b6dad 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -131,7 +131,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { detect: if len(branchName) > 0 { // TODO check tag - if models.IsBranchExist(user.Name, repoName, branchName) { + if gitRepo.IsBranchExist(branchName) { ctx.Repo.IsBranch = true ctx.Repo.BranchName = branchName @@ -141,7 +141,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { return } - ctx.Repo.CommitId = ctx.Repo.Commit.Oid.String() + ctx.Repo.CommitId = ctx.Repo.Commit.Id.String() } else if len(branchName) == 40 { ctx.Repo.IsCommit = true @@ -181,7 +181,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { } ctx.Data["BranchName"] = ctx.Repo.BranchName - brs, err := models.GetBranches(user.Name, repoName) + brs, err := ctx.Repo.GitRepo.GetBranches() if err != nil { log.Error("RepoAssignment(GetBranches): %v", err) } |