• Patrick Steinhardt's avatar
    checks: Fix LFS pointer checks only verifying first reference · b37691bc
    Patrick Steinhardt authored
    Because of performance concerns and infrastructure limitations, the
    checks which verify that all new LFS pointers have matching LFS objects
    is only ever checking the first pushed reference. This is easy to
    circumvent by just introducing the LFS pointer with the second
    reference (this isn't quite true anymore given that LFS pointer checks
    use the object quarantine directory to enumerate LFS pointers nowadays,
    which always goes over all pushed objects and ignores refs completely).
    
    Now that we have the infrastructure to easily perform checks over
    batched changes, this commit converts the LfsCheck class to be
    implemented on top of a new BaseBulkChecker. With this change, we now
    have all reference updates available at once and can thus efficiently
    query the repository for any new LFS pointers introduced by any one of
    the references. This makes for a cleaner design given that we don't need
    the `skip_lfs_integrity_check` variable anymore, and is also safer to
    use.
    
    Changelog: fixed
    b37691bc
lfs_check_spec.rb 2.3 KB