Allow code review comments display cross commits even if the head branch has a force-push

This commit is contained in:
Lunny Xiao
2025-07-13 16:07:46 -07:00
parent 3531e9dbfd
commit 345ae04837
24 changed files with 562 additions and 384 deletions

View File

@@ -181,4 +181,10 @@ func TestParseDiffHunkString(t *testing.T) {
assert.Equal(t, 3, leftHunk)
assert.Equal(t, 19, rightLine)
assert.Equal(t, 5, rightHunk)
leftLine, leftHunk, rightLine, rightHunk = ParseDiffHunkString("@@ -1 +0,0 @@")
assert.Equal(t, 1, leftLine)
assert.Equal(t, 1, leftHunk)
assert.Equal(t, 0, rightLine)
assert.Equal(t, 0, rightHunk)
}