mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-03 23:04:27 +00:00
refactor: make git package handle all git operations (#38543)
before: gitrepo vs git packages after: git package fully handle all git operations by the way, use `WithRepo(repo)` instead of `WithDir(repo.Path)` to hide path details. benefits: 1. remove all unnecessary wrappers, developers no need to struggle with "which package should be used" 2. simplify code, RepositoryFacade can (will) be used everywhere, all "path" details are (will be) hidden
This commit is contained in:
@@ -41,7 +41,7 @@ func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan c
|
||||
|
||||
// 3. Take the shas of the blobs and batch read them
|
||||
wg.Go(func() error {
|
||||
return pipeline.CatFileBatch(ctx, cmd3BatchContent, repo.Path)
|
||||
return pipeline.CatFileBatch(ctx, cmd3BatchContent, repo)
|
||||
})
|
||||
|
||||
// 2. From the provided objects restrict to blobs <=1k
|
||||
@@ -51,7 +51,7 @@ func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan c
|
||||
|
||||
// 1. Run batch-check on all objects in the repository
|
||||
wg.Go(func() error {
|
||||
return pipeline.CatFileBatchCheckAllObjects(ctx, cmd1AllObjs, repo.Path)
|
||||
return pipeline.CatFileBatchCheckAllObjects(ctx, cmd1AllObjs, repo)
|
||||
})
|
||||
err := wg.Wait()
|
||||
close(pointerChan)
|
||||
|
||||
Reference in New Issue
Block a user