mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-07 09:49:41 +09:00
Refactor git command stdio pipe (#36422)
Most potential deadlock problems should have been fixed, and new code is unlikely to cause new problems with the new design. Also raise the minimum Git version required to 2.6.0 (released in 2015)
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
// SearchPointerBlobs scans the whole repository for LFS pointer files
|
||||
func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan chan<- PointerBlob, errChan chan<- error) {
|
||||
func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan chan<- PointerBlob) error {
|
||||
gitRepo := repo.GoGitRepo()
|
||||
|
||||
err := func() error {
|
||||
@@ -49,14 +49,7 @@ func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan c
|
||||
return nil
|
||||
})
|
||||
}()
|
||||
if err != nil {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
default:
|
||||
errChan <- err
|
||||
}
|
||||
}
|
||||
|
||||
close(pointerChan)
|
||||
close(errChan)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user