Delete commit and update getlastcommit

This commit is contained in:
Unknown 2014-03-18 00:14:05 -04:00
parent e656609b0d
commit e44d9ffd89
4 changed files with 11 additions and 38 deletions

View file

@ -90,13 +90,13 @@ func Single(ctx *middleware.Context, params martini.Params) {
}
// Get latest commit according username and repo name
commit, err := models.GetLastestCommit(params["username"], params["reponame"])
commit, err := models.GetLastCommit(params["username"], params["reponame"], params["branchname"])
if err != nil {
log.Error("repo.Single(GetLastestCommit): %v", err)
ctx.Render.Error(404)
return
}
ctx.Data["LatestCommit"] = commit
ctx.Data["LastCommit"] = commit
var readmeFile *models.RepoFile