Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move git graph from models to modules/graph #9027

Merged
merged 3 commits into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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