Skip to content

Commit

Permalink
Properly count total objects during pack creation (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Dec 6, 2021
1 parent aa182e3 commit bcb3d37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions git-pack/src/data/output/count/objects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ mod expand {
AsIs => push_obj_count_unique(&mut out, seen_objs, &id, location, progress, stats, false),
}
}
outcome.total_objects = out.len();
Ok((out, outcome))
}

Expand Down
3 changes: 1 addition & 2 deletions git-pack/src/data/output/count/objects/reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ where
type Error = E;

fn feed(&mut self, item: Self::Input) -> Result<Self::FeedProduce, Self::Error> {
let (counts, mut stats) = item?;
stats.total_objects = counts.len();
let (counts, stats) = item?;
self.total.aggregate(stats);
self.progress.lock().inc_by(counts.len());
self.counts.extend(counts);
Expand Down

0 comments on commit bcb3d37

Please sign in to comment.