mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-02 23:49:36 +00:00
refactor: remove Ctx field from git.Repository (#38500)
This commit is contained in:
@@ -16,14 +16,14 @@ import (
|
||||
)
|
||||
|
||||
func BenchmarkGetCommitGraph(b *testing.B) {
|
||||
currentRepo, err := git.OpenRepository(b.Context(), ".")
|
||||
currentRepo, err := git.OpenRepository(".")
|
||||
if err != nil || currentRepo == nil {
|
||||
b.Error("Could not open repository")
|
||||
}
|
||||
defer currentRepo.Close()
|
||||
|
||||
for b.Loop() {
|
||||
graph, err := GetCommitGraph(currentRepo, 1, 0, false, nil, nil)
|
||||
graph, err := GetCommitGraph(b.Context(), currentRepo, 1, 0, false, nil, nil)
|
||||
if err != nil {
|
||||
b.Error("Could get commit graph")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user