mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-02 19:09:39 +00:00
refactor: remove Path field from git.Repository (#38552)
The "path" details should be hidden to other packages By the way, fix a resource leaking in gogit's CommitNodeIndex (the file was not closed in CacheCommit)
This commit is contained in:
@@ -25,7 +25,8 @@ func TestCatFileBatch(t *testing.T) {
|
||||
}
|
||||
|
||||
func testCatFileBatch(t *testing.T) {
|
||||
repo1 := gitcmd.RepositoryUnmanaged(filepath.Join(testReposDir, "repo1_bare"))
|
||||
repo1Path, _ := filepath.Abs(filepath.Join(testReposDir, "repo1_bare"))
|
||||
repo1 := gitcmd.RepositoryUnmanaged(repo1Path)
|
||||
t.Run("CorruptedGitRepo", func(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
batch, err := NewBatch(t.Context(), gitcmd.RepositoryUnmanaged(tmpDir))
|
||||
|
||||
Reference in New Issue
Block a user