(ctx context.Context, repo model.RepoConfig, headOID string)
| 262 | for _, p := range pools { |
| 263 | p.closeAll() |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | func (s *Store) SetBatchPoolSize(n int) { |
| 268 | if n <= 0 { |
| 269 | return |
| 270 | } |
| 271 | s.mu.Lock() |
| 272 | defer s.mu.Unlock() |
| 273 | if s.closed { |
| 274 | return |
| 275 | } |
| 276 | s.poolMaxSize = n |
| 277 | for _, p := range s.pools { |
| 278 | p.setMaxSize(n) |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | func (s *Store) CloneBlobless(ctx context.Context, cfg model.RepoConfig) error { |
| 283 | return s.cloneBlobless(ctx, cfg, nil) |
| 284 | } |
| 285 | |
| 286 | func (s *Store) CloneBloblessNonInteractive(ctx context.Context, cfg model.RepoConfig) error { |
| 287 | return s.cloneBlobless(ctx, cfg, nonInteractiveGitEnv()) |
| 288 | } |
| 289 | |
| 290 | func (s *Store) cloneBlobless(ctx context.Context, cfg model.RepoConfig, extraEnv []string) error { |
| 291 | if _, err := os.Stat(cfg.GitDir); err == nil { |
| 292 | return nil |
| 293 | } else if !errors.Is(err, os.ErrNotExist) { |
| 294 | return err |
| 295 | } |
| 296 | parent := filepath.Dir(cfg.GitDir) |
| 297 | if err := os.MkdirAll(parent, 0o755); err != nil { |
nothing calls this directly
no test coverage detected