1
0
Fork 0

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

This commit is contained in:
Lunny Xiao 2019-11-16 08:47:57 +08:00 committed by GitHub
parent 69cfff1541
commit 11208f3381
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a MIT-style // Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package models package gitgraph
import ( import (
"fmt" "fmt"

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a MIT-style // Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package models package gitgraph
import ( import (
"fmt" "fmt"

View file

@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/charset"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/gitgraph"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/services/gitdiff" "code.gitea.io/gitea/services/gitdiff"
@ -99,7 +100,7 @@ func Graph(ctx *context.Context) {
page := ctx.QueryInt("page") page := ctx.QueryInt("page")
graph, err := models.GetCommitGraph(ctx.Repo.GitRepo, page) graph, err := gitgraph.GetCommitGraph(ctx.Repo.GitRepo, page)
if err != nil { if err != nil {
ctx.ServerError("GetCommitGraph", err) ctx.ServerError("GetCommitGraph", err)
return return