Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !13744

Fix old MR diffs

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Sean McGivern requested to merge fix-old-mr-diffs into master Aug 22, 2017
  • Overview 14
  • Commits 2
  • Pipelines 4
  • Changes 3

What does this MR do?

Fix old MR diffs, when we can't figure out the correct diff refs. This is in two commits. The first doesn't preview them, and the second makes them look like this (note that the added diff can still be highlighted!):

image

Are there points in the code the reviewer needs to double check?

  1. Should new_file? || deleted_file? || content_changed? be moved to a method? What should we call it?
  2. I didn't actually do https://gitlab.com/gitlab-org/gitlab-ce/issues/36516#note_38068227, but just redefined highlighted_diff_lines instead. This seems more natural to me, but maybe I'm missing something.

Why was this MR needed?

I broke fallback_diff_refs 🤦

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by Backend
  • Conform by the merge request performance guides
  • Conform by the style guides
  • Squashed related commits together

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/36516.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-old-mr-diffs