(ctx context.Context)
| 47 | } |
| 48 | |
| 49 | func (g gitTracker) Close(ctx context.Context) { |
| 50 | fs := utils.FS(ctx) |
| 51 | |
| 52 | g.repositories.Range(func(_, val any) bool { |
| 53 | r, err := val.(func() (*git.Repository, error))() |
| 54 | if err != nil { |
| 55 | return true |
| 56 | } |
| 57 | |
| 58 | bfs := r.Storer.(*filesystem.Storage).Filesystem() |
| 59 | |
| 60 | // ignore error |
| 61 | _ = fs.RemoveAll(bfs.Root()) |
| 62 | |
| 63 | return true |
| 64 | }) |
| 65 | } |
| 66 | |
| 67 | func clone(ctx context.Context, repository string) (*git.Repository, error) { |
| 68 | fs := utils.FS(ctx) |