mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-01 10:48:23 +00:00
Allow code review comments display cross commits even if the head branch has a force-push
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user