GitLab: Reload with full diff

Recently I had to code review a merge request with a large number of changed files.  There were so many files that GitLab could not show the full diff.

In this circumstance, GitLab gives the user the option of reloading the full diff with warning that it could affect the performance.  I needed to see the full diff because the other option was going through the file list and using another diff tool on the individual files to see what had changed, good or bad.  That wasn’t really what I wanted to do.

When I clicked on the reload button, after a few seconds, Notepad opened up with the full diff inside it.  It wasn’t easily legible. This wouldn’t have been my preferred option.

Solution:

I found out that tweaking the url slightly fixes the issue:

project/merge_requests/<merge_id>/diffs.json?force_show_diff=true

Removing the “.json” from the url will show the diff where you would expect it to be, in GitLab.  It is formatted nicer than Notepad.

It has been reported that this had been fixed in version 7.10 but at time of writing our version of GitLab is at 7.13.4. 

Until it is finally resolved, the above solution is a workaround if you run into this problem.

Leave a comment