We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BatchObjectIter
1 parent 8d9be87 commit f6f4e19Copy full SHA for f6f4e19
sizes/graph.go
@@ -174,7 +174,11 @@ func ScanRepositoryUsingGraph(
174
if err != nil {
175
return HistorySize{}, err
176
}
177
- defer objectIter.Close()
+ defer func() {
178
+ if objectIter != nil {
179
+ objectIter.Close()
180
+ }
181
+ }()
182
183
go func() {
184
defer objectIn.Close()
@@ -313,6 +317,12 @@ func ScanRepositoryUsingGraph(
313
317
314
318
315
319
320
+ err = objectIter.Close()
321
+ objectIter = nil
322
+ if err != nil {
323
+ return HistorySize{}, err
324
325
+
316
326
progressMeter.Start("Processing references: %d")
327
for _, ref := range refs {
328
progressMeter.Inc()
0 commit comments