diff.json returns 404 for empty commits
Summary
Changes tab doesn't load when comparing with previous version which contains an empty commit.
Steps to reproduce
- create new branch from default branch
- create merge request from branch (without any commits)
- create empty commit on the branch
- in the system note for the push on the merge request page lick on
Compare with previous version
Example
- Click
Compare with previous version
in gitlab-foss!21374 (comment 96756591) - The changes tab doesn't load because https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/21374/diffs.json?diff_id=21822823&start_sha=7a9558a1521062d5f5c49a3bfda615afd60ba668 returns a 404 error page.
What is the current bug behavior?
error is shown and changes tab doesn't load
What is the expected correct behavior?
tab is shown without error
Edited by Inactive Account