Skip to content

Commit d11faa5

Browse files
committed
more bug comment
1 parent 7611881 commit d11faa5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/git/diff.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLi
279279
// "git diff" outputs "@@ -1 +1,3 @@" for "OLD" => "A\nB\nC"
280280
// FIXME: GIT-DIFF-CUT-BUG But there is a bug in CutDiffAroundLine, then the "Patch" stored in the comment model becomes "@@ -1,1 +0,4 @@"
281281
// It may generate incorrect results for difference cases, for example: delete 2 line add 1 line, delete 2 line add 2 line etc, need to double check.
282+
// For example: "L1\nL2" => "A\nB", then the patch shows "L2" as line 1 on the left (deleted part)
282283

283284
// construct the new hunk header
284285
newHunk[headerLines] = fmt.Sprintf("@@ -%d,%d +%d,%d @@",

0 commit comments

Comments
 (0)