Browse Source

Move git graph from models to modules/graph (#9027)

lunny/display_deleted_branch2
Lunny Xiao 3 years ago
committed by GitHub
parent
commit
11208f3381
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/gitgraph/graph.go
  2. 2
      modules/gitgraph/graph_test.go
  3. 3
      routers/repo/commit.go

2
models/graph.go → 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"

2
models/graph_test.go → 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"

3
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

Loading…
Cancel
Save