diff --git a/models/graph.go b/modules/gitgraph/graph.go similarity index 99% rename from models/graph.go rename to modules/gitgraph/graph.go index 0efb51b3f..0dd68ad5c 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 similarity index 99% rename from models/graph_test.go rename to modules/gitgraph/graph_test.go index 78bfcb27e..a2c7f447b 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 2a123a2eb..084c49517 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