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 throughviewer.collapsed?
(i.e. It usesCOLLAPSE_LIMIT
) - Is safe_max_* limits always used in a collapsing context? I wonder if we should make it explicit
Edited by Oswaldo Ferreira