Skip to content

Only expose 1 diff style in diffs endpoint

What does this MR do?

When enabling the single_mr_diff_view feature flag, the backend will only render one kind of diff: inline or parallel. The feature is disabled for now until the frontend has been updated.

To switch the view, the frontend can pass a view param containing either inline or parallel. That will get written to a cookie. The response for diff files will then contain either highlighted_diff_lines or parallel_diff_lines but no longer both.

This is the backend part of #33183 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports