Toggling display whitespace removes git commit hash from diff view

Summary

When toggling “show whitespace changes” in a merge request (MR) it removes the commit hash from the URL

Steps to reproduce

  1. Open a new merge request.
  2. Push another commit to it
  3. Click on the second commit’s hash to view diff only for that commit
  4. from the cog wheel in the right corner toggle “show whitespace changes”
  5. the commit is removed from the url - reloading the page now would show you the entire MR diff
  6. further toggling will only set the w param to either 0 or 1, there is no turning back to the commit hash

What is the expected correct behavior?

Only add the param &w=1 not remove the existing ?commit_id=12345

Relevant logs and/or screenshots

hash-gets-removed

Edited Jul 10, 2019 by Jannis Hell
Assignee Loading
Time tracking Loading