ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
B Wilson 01a9ce0c71 diff: Treat multi-byte UTF-8 runes as word characters
Inline diffs on multi-byte UTF-8 characters would match individual
bytes, causing garbled diffs in some cases. For example, replacing
`⊢` with `⊣`, which differ in the final byte only, caused the
diff to display a diff of the bytes instead the character.

This commit uses a workaround present in Mercurial by treating all
bytes 0x80 and above as word characters, causing any multi-byte
character to be treated as a word and not segmented.

https://www.mercurial-scm.org/repo/hg/file/6.3.3/mercurial/patch.py#l51
2023-03-30 00:06:56 +09:00
..
benches
gen-protos
src diff: Treat multi-byte UTF-8 runes as word characters 2023-03-30 00:06:56 +09:00
tests
testutils
build.rs
Cargo.toml