let index.Each() and pack.Size() return error on canceled context

This forces a caller to actually check that the function did complete.
This commit is contained in:
Michael Eischer
2024-04-05 22:20:14 +02:00
parent 31624aeffd
commit 940a3159b5
20 changed files with 107 additions and 72 deletions

View File

@@ -54,7 +54,10 @@ func RepairIndex(ctx context.Context, repo *Repository, opts RepairIndexOptions,
if err != nil {
return err
}
packSizeFromIndex = pack.Size(ctx, repo.Index(), false)
packSizeFromIndex, err = pack.Size(ctx, repo.Index(), false)
if err != nil {
return err
}
}
printer.P("getting pack files to read...\n")