Merge request caching old diffs
Summary
After rebasing and then force pushing to an open MR, a commit shows the wrong diff.
Steps to reproduce
Quoting from graphviz/graphviz!2060 (comment 631339811):
I can reliably reproduce this:
- Switch to the commits tab of this MR and click into the first commit
- Step to this, the second commit
- Diff will be wrong, as described above
- Refresh
- Diff is right
- Step back to the commits tab and click into the first commit
- Step to this, the second commit
- Diff will be wrong again
- Goto 4
This problem is still live and reproducible by three of us on independent machines. It does not seem affected by caching, OS, or browser choice.
Example Project
The specific problem is still live and reproducible in graphviz/graphviz!2060 (merged). Quoting my description from there:
Something odd is going on, which I think may be what @magjac experienced. The Gitlab UI is showing me the diff
- return vmresize(ex->ve, NULL, sz); + return vmresize(ex->ve, p, sz);
for commit e7199bc9d88fcec668bec40d40afbe3d482c878e. But that is not the diff for this commit. The correct diff is
- return vmresize(ex->ve, NULL, sz); + return vmalloc(ex->ve, sz);
What is the current bug behavior?
Until refresh, the incorrect diff is shown:
- return vmresize(ex->ve, NULL, sz);
+ return vmresize(ex->ve, p, sz);
What is the expected correct behavior?
The correct diff shown in all circumstances:
- return vmresize(ex->ve, NULL, sz);
+ return vmalloc(ex->ve, sz);
Relevant logs and/or screenshots
This happens on Gitlab.com
Output of checks
This happens on Gitlab.com
Results of GitLab environment info
This happens on Gitlab.com
Results of GitLab application Check
This happens on Gitlab.com
Possible fixes
Related to #336158 (closed)?