Skip to content

blob: Fix filtering of new LFS pointers

When retrieving new LFS pointers, we allow callers to pass in a limit to only fetch the first n blobs. But the way this limit currently works is completely unintuitive: we take the first n candidates for LFS pointers and filter those down to actual LFS pointers. Which effectively means that even if there are new pointers, we may just return none at all because git-rev-list(1) decided to output different objects first.

This behaviour is so weird that it cannot be the desired behaviour: if less objects than the provided limit are returned to the caller, then there is no way to determine whether there actually were any LFS pointers or not. It's thus trivial to smuggle in LFS pointers which we wouldn't detect.

Fix this issue by limiting actual LFS pointers, not candidate LFS pointers.


This MR also adds a second commit which may significantly speed up retrieving new LFS pointers by using a blob-size filter for git-rev-list(1).

Part of #3058 (closed)

Merge request reports

Loading