Skip to content

Commit

Permalink
Move git graph from models to modules/graph (#9027)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Nov 16, 2019
1 parent 69cfff1 commit 11208f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion models/graph.go → modules/gitgraph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion models/graph_test.go → modules/gitgraph/graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion routers/repo/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 11208f3

Please sign in to comment.