mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
go vet and fix #1890
This commit is contained in:
@@ -38,7 +38,6 @@ func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List {
|
||||
newCommits := list.New()
|
||||
for e := oldCommits.Front(); e != nil; e = e.Next() {
|
||||
c := e.Value.(*git.Commit)
|
||||
c.CommitMessage = c.CommitMessage
|
||||
newCommits.PushBack(c)
|
||||
}
|
||||
return newCommits
|
||||
@@ -196,7 +195,6 @@ func Diff(ctx *middleware.Context) {
|
||||
commitID := ctx.Repo.CommitID
|
||||
|
||||
commit := ctx.Repo.Commit
|
||||
commit.CommitMessage = commit.CommitMessage
|
||||
diff, err := models.GetDiffCommit(models.RepoPath(userName, repoName),
|
||||
commitID, setting.Git.MaxGitDiffLines)
|
||||
if err != nil {
|
||||
|
@@ -158,7 +158,7 @@ func HTTP(ctx *middleware.Context) {
|
||||
}
|
||||
|
||||
if !isPull && repo.IsMirror {
|
||||
ctx.HandleText(401, "can't push to mirror")
|
||||
ctx.HandleText(401, "mirror repository is read-only")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@@ -250,11 +250,6 @@ func Action(ctx *middleware.Context) {
|
||||
redirectTo = ctx.Repo.RepoLink
|
||||
}
|
||||
ctx.Redirect(redirectTo)
|
||||
|
||||
return
|
||||
ctx.JSON(200, map[string]interface{}{
|
||||
"ok": true,
|
||||
})
|
||||
}
|
||||
|
||||
func Download(ctx *middleware.Context) {
|
||||
|
Reference in New Issue
Block a user