Skip to content

Commit 015fd4a

Browse files
committed
Don't init catfile when open repository just leave it when invoke CatFileBatch
1 parent 5afbfb2 commit 015fd4a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

modules/git/repo_base_nogogit.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,11 @@ func OpenRepository(ctx context.Context, repoPath string) (*Repository, error) {
5656
return nil, err
5757
}
5858

59-
repo := &Repository{
59+
return &Repository{
6060
Path: repoPath,
6161
tagCache: newObjectCache(),
6262
Ctx: ctx,
63-
}
64-
65-
repo.batch = repo.NewBatch(ctx)
66-
repo.check = repo.NewBatchCheck(ctx)
67-
68-
return repo, nil
63+
}, nil
6964
}
7065

7166
// CatFileBatch obtains a CatFileBatch for this repository

0 commit comments

Comments
 (0)