Skip to content

Fix buffering in DiffCollection

What does this MR do?

Gitlab::Git::DiffCollection had a bug where if you iterated partially and then again, the second iterating run would be missing some entries. So for example if you would call #empty? and then #to_a to get an Array, the array would be missing one element (namely the second element returned by the underlying iterator).

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

It's not good if files disappear from a diff.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Jacob Vosmaer (GitLab)

Merge request reports