• Alejandro Rodríguez's avatar
    Optimize commit and diff changes access check to reduce git operations · 700ca8d2
    Alejandro Rodríguez authored
    Git operations are costly. Before, if file locks and all file locks were
    enabled we would iterate over each commit twice and over each diff as much
    as 4 times. This updates uses lambdas to go through all neccessary validations
    in only one iteration per commit and per diff. It also removes some unused
    code in lib/gitlab/git_access.rb and adds examples to ensure the code keeps
    working as intended.
    700ca8d2
change_access_spec.rb 8.14 KB