diff options
author | Unknwon <u@gogs.io> | 2015-11-08 14:31:49 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-08 14:31:49 -0500 |
commit | b55499d039c5e35130057b8af16401c558e79e79 (patch) | |
tree | 4f3fc503ac7f1bb4f63733f359ba450fd90f3f1b /routers | |
parent | 58436b5ea51cb5e09fb244331d7a9acf70258063 (diff) | |
download | gitea-b55499d039c5e35130057b8af16401c558e79e79.tar.gz gitea-b55499d039c5e35130057b8af16401c558e79e79.zip |
go vet and fix #1890
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/commit.go | 2 | ||||
-rw-r--r-- | routers/repo/http.go | 2 | ||||
-rw-r--r-- | routers/repo/repo.go | 5 |
3 files changed, 1 insertions, 8 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 13483cc881..d0dd01de88 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -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 { diff --git a/routers/repo/http.go b/routers/repo/http.go index 178ae92c1a..214cc9ba39 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -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 } } diff --git a/routers/repo/repo.go b/routers/repo/repo.go index a13526edf4..ab7b4b99e5 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -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) { |