From 07b41769dc055e9f4996e02ad313d4b8d4202706 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 13 Jun 2026 22:03:41 -0700 Subject: [PATCH] update --- modules/gitrepo/fetch_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/gitrepo/fetch_test.go b/modules/gitrepo/fetch_test.go index 7e2d551ecb..0b5294145a 100644 --- a/modules/gitrepo/fetch_test.go +++ b/modules/gitrepo/fetch_test.go @@ -49,11 +49,9 @@ func TestFetchRemoteCommitConcurrentDifferentCommits(t *testing.T) { errCh := make(chan error, len(commitIDs)) var wg sync.WaitGroup for _, commitID := range commitIDs { - wg.Add(1) - go func(commitID string) { - defer wg.Done() + wg.Go(func() { errCh <- FetchRemoteCommit(t.Context(), targetRepo, sourceRepo, commitID) - }(commitID) + }) } wg.Wait() close(errCh)