Simplify single and collection diff file limits

As documented on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18269/diffs, we have way too many diff limit variations through the codebase. These are applied on commit, compare and merge request views.

Ideally we should simplify it in order to be confident when making a change on these limits. I still don't have a concrete proposal for it, be these are a couple of thoughts and concerns:

  • Collapsing based on safe limits just exists for Rugged apparently. Should it happen for Gitaly calls as well?
  • Commit::COMMIT_SAFE_LINES is really needed? It seems like we already handle the collapse view through viewer.collapsed? (i.e. It uses COLLAPSE_LIMIT )
  • Is safe_max_* limits always used in a collapsing context? I wonder if we should make it explicit
Edited Apr 25, 2018 by Oswaldo Ferreira
Assignee Loading
Time tracking Loading