mirror of
https://github.com/go-gitea/gitea
synced 2026-02-03 08:50:36 +00:00
Refactor cat-file batch operations and support --batch-command approach (#35775)
Replace #34651 and address more problems including fix framework bugs and changing to QueryInfo and QueryContent calls. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -143,8 +143,9 @@ func LoadRepoCommit(t *testing.T, ctx gocontext.Context) {
|
||||
|
||||
gitRepo, err := gitrepo.OpenRepository(ctx, repo.Repository)
|
||||
require.NoError(t, err)
|
||||
defer gitRepo.Close()
|
||||
|
||||
t.Cleanup(func() {
|
||||
gitRepo.Close()
|
||||
})
|
||||
if repo.RefFullName == "" {
|
||||
repo.RefFullName = git_module.RefNameFromBranch(repo.Repository.DefaultBranch)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user