Skip to content

Commit da585db

Browse files
committed
fix: don't incorrectly mark as auto-resolved conflict if there was none.
Previously it was possible to mark perfectly working content merges as conflicting if we would choose 'our' or 'their' resolution.
1 parent aaeb427 commit da585db

File tree

1 file changed

+3
-2
lines changed
  • gix-merge/src/blob/builtin_driver/text

1 file changed

+3
-2
lines changed

gix-merge/src/blob/builtin_driver/text/utils.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ pub fn hunks_differ_in_diff3(
1616
return true;
1717
}
1818

19-
let tokens_for_hunk =
20-
|hunk: &Hunk| -> &[imara_diff::intern::Token] { tokens_for_side(hunk.side, input, current_tokens) };
19+
let tokens_for_hunk = |hunk: &Hunk| -> &[imara_diff::intern::Token] {
20+
&tokens_for_side(hunk.side, input, current_tokens)[hunk.after.start as usize..hunk.after.end as usize]
21+
};
2122

2223
a.iter()
2324
.flat_map(tokens_for_hunk)

0 commit comments

Comments
 (0)