mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-25 06:21:26 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -33,6 +33,13 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Reponame"] = params["reponame"]
|
||||
ctx.Data["Branchname"] = params["branchname"]
|
||||
|
||||
brs, err := models.GetBranches(params["username"], params["reponame"])
|
||||
if err != nil {
|
||||
ctx.Handle(200, "repo.Single", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Branches"] = brs
|
||||
|
||||
var treenames []string
|
||||
Paths := make([]string, 0)
|
||||
|
||||
@ -43,6 +50,13 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
}
|
||||
}
|
||||
|
||||
commit, err := models.GetLastestCommit(params["username"], params["reponame"])
|
||||
if err != nil {
|
||||
ctx.Handle(200, "repo.Single", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["LatestCommit"] = commit
|
||||
|
||||
ctx.Data["Paths"] = Paths
|
||||
ctx.Data["Treenames"] = treenames
|
||||
ctx.Data["IsRepoToolbarSource"] = true
|
||||
|
Reference in New Issue
Block a user