If a portion of a file is independently deleted in two branches, then sometimes the diff view is incorrect.
To reproduce, create a new repo in stash, then run the attached shell script (changing the remote URL if needed), and view the diff between master and branch:
Expected results: the diff view shows the first line changed from 'MASTER START' to 'BRANCH START', like 'git diff master branch' shows:
$ git diff master branch
diff --git a/test.txt b/test.txt
index 9199536..91ad9bb 100644
@@ -1,3 +1,3 @@
Actual results: the diff view shows the 'MIDDLE' section having been deleted as well as the first line changing
Reversing the source/dest branches (ie http://localhost:7990/stash/projects/TEST/repos/diffbug/compare/diff?targetBranch=refs%2Fheads%2Fbranch) shows the ONLY the middle section changing WITHOUT the first line changing.
This affects both the side-by-side diff and the unified Once a pull request is made, then the diff in the PR is correct.