diff view of commit reports BASE commit as HEAD commit if only removing lines.
Created by: keegancsmith
In our diff view, we report the BASE and the HEAD of the file diff we are showing. When the diff is only files removed, it seems we incorrectly calculate HEAD as the base.
Example this file in this commit gives the wrong value for HEAD. https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/commit/a8b56db8b523045179921b2b988813009f3a8fe7#diff-97aa71d6e951f1eedbca254b6f8d2c1d
If we only add lines we don't seem to suffer from the issue. I haven't had a chance to debug much, but I saw a bunch of BlameFile calls which made me think we are basing stuff on blame rather than diff info. So initially assigning as a frontend task. But will dive in a little more tomorrow to actually see where we are going wrong.
/cc @taylorsperry @jasongornall