Skip to content

Commit

Permalink
Don't init catfile when open repository just leave it when invoke Cat…
Browse files Browse the repository at this point in the history
…FileBatch
  • Loading branch information
lunny committed Aug 1, 2024
1 parent 5afbfb2 commit 015fd4a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions modules/git/repo_base_nogogit.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,11 @@ func OpenRepository(ctx context.Context, repoPath string) (*Repository, error) {
return nil, err
}

repo := &Repository{
return &Repository{
Path: repoPath,
tagCache: newObjectCache(),
Ctx: ctx,
}

repo.batch = repo.NewBatch(ctx)
repo.check = repo.NewBatchCheck(ctx)

return repo, nil
}, nil
}

// CatFileBatch obtains a CatFileBatch for this repository
Expand Down

0 comments on commit 015fd4a

Please sign in to comment.