mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 06:02:18 +02: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:
1 parent
b8977eeb47
commit
9dc04289aa
214 files changed
+859
-1301
No files matched your search
@@ -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