• Stan Hu's avatar
    Link existing LFS objects from parent fork during uploads · 0a374212
    Stan Hu authored
    Previously LFS uploads would always have to be reuploaded to a fork even
    if the parent already had received the LFS file, but this is
    unnecessary, wasting time and bandwidth. Consider this sequence of
    events:
    
    1. Push LFS file `test.bin` to project A.
    2. Fork project A to project B.
    3. Push LFS file `test2.bin` to project A.
    4. Push to project B.
    
    When 4 happens, GitLab should be smart enough to realize that if the
    user has access to the parent project, then we should be able to link
    the LFS files in A without requesting a reupload of the file.
    
    Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/297022
    
    Changelog: fixed
    0a374212
lfs_objects_project.rb 1.23 KB