mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-03 11:24:39 +00:00
refactor: remove Ctx field from git.Repository (#38500)
This commit is contained in:
@@ -811,7 +811,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
|
||||
return
|
||||
}
|
||||
|
||||
gitRepo, err := git.OpenRepository(t.Context(), dstPath)
|
||||
gitRepo, err := git.OpenRepository(dstPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
defer gitRepo.Close()
|
||||
@@ -848,7 +848,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
|
||||
Message: "Testing commit 1",
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
commit, err = gitRepo.GetRefCommitID("HEAD")
|
||||
commit, err = gitRepo.GetRefCommitID(t.Context(), "HEAD")
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
|
||||
@@ -920,7 +920,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
|
||||
Message: "Testing commit 2",
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
commit, err = gitRepo.GetRefCommitID("HEAD")
|
||||
commit, err = gitRepo.GetRefCommitID(t.Context(), "HEAD")
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user