Skip to content

Commit ff727e0

Browse files
committed
correct
1 parent 0ed2e89 commit ff727e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/git/diff.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ func ParseDiffHunkString(diffHunk string) (leftLine, leftHunk, rightLine, rightH
122122
if rightLine == 0 {
123123
// "git diff" outputs 2 different formats for the same change "OLD" => "A\nB\nC"
124124
// * "@@ -1 +1,3 @@": the expected result
125-
// * "@@ -1,1 +0,4 @@": the "0" means "insert before the first line"
125+
// * "@@ -1,1 +0,3 @@": the "0" means "insert before the first line"
126126
rightLine++
127-
rightHunk--
128127
}
129128
return leftLine, leftHunk, rightLine, rightHunk
130129
}

0 commit comments

Comments
 (0)