Refactor changing files in web UI
EE port: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1268
Followup to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9349 with much-needed refactoring.
Together with https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9207, this will make our logic for editing files in the web interface a lot easier to follow and much less error prone.
To do
-
Fix specs
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/28711.