Skip to content

Commit 11208f3

Browse files
authored
Move git graph from models to modules/graph (#9027)
1 parent 69cfff1 commit 11208f3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

models/graph.go renamed to modules/gitgraph/graph.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5-
package models
5+
package gitgraph
66

77
import (
88
"fmt"

models/graph_test.go renamed to modules/gitgraph/graph_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5-
package models
5+
package gitgraph
66

77
import (
88
"fmt"

routers/repo/commit.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"code.gitea.io/gitea/modules/charset"
1515
"code.gitea.io/gitea/modules/context"
1616
"code.gitea.io/gitea/modules/git"
17+
"code.gitea.io/gitea/modules/gitgraph"
1718
"code.gitea.io/gitea/modules/log"
1819
"code.gitea.io/gitea/modules/setting"
1920
"code.gitea.io/gitea/services/gitdiff"
@@ -99,7 +100,7 @@ func Graph(ctx *context.Context) {
99100

100101
page := ctx.QueryInt("page")
101102

102-
graph, err := models.GetCommitGraph(ctx.Repo.GitRepo, page)
103+
graph, err := gitgraph.GetCommitGraph(ctx.Repo.GitRepo, page)
103104
if err != nil {
104105
ctx.ServerError("GetCommitGraph", err)
105106
return

0 commit comments

Comments
 (0)