diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-16 08:47:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-16 08:47:57 +0800 |
commit | 11208f33818ae3fe2f32581285c358b5cfcf5992 (patch) | |
tree | 7c8766a17165d391e38b504ff62ecee27f28a04f | |
parent | 69cfff15416d01feec6a45c0c6554481ba6f3c1f (diff) | |
download | gitea-11208f33818ae3fe2f32581285c358b5cfcf5992.tar.gz gitea-11208f33818ae3fe2f32581285c358b5cfcf5992.zip |
Move git graph from models to modules/graph (#9027)
-rw-r--r-- | modules/gitgraph/graph.go (renamed from models/graph.go) | 2 | ||||
-rw-r--r-- | modules/gitgraph/graph_test.go (renamed from models/graph_test.go) | 2 | ||||
-rw-r--r-- | routers/repo/commit.go | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/models/graph.go b/modules/gitgraph/graph.go index 0efb51b3fc..0dd68ad5c5 100644 --- a/models/graph.go +++ b/modules/gitgraph/graph.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package models +package gitgraph import ( "fmt" diff --git a/models/graph_test.go b/modules/gitgraph/graph_test.go index 78bfcb27ec..a2c7f447b6 100644 --- a/models/graph_test.go +++ b/modules/gitgraph/graph_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package models +package gitgraph import ( "fmt" diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 2a123a2eb9..084c495174 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/gitgraph" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/services/gitdiff" @@ -99,7 +100,7 @@ func Graph(ctx *context.Context) { page := ctx.QueryInt("page") - graph, err := models.GetCommitGraph(ctx.Repo.GitRepo, page) + graph, err := gitgraph.GetCommitGraph(ctx.Repo.GitRepo, page) if err != nil { ctx.ServerError("GetCommitGraph", err) return |