diff_xdiff.c
7.33 KB
-
Sanitize the hunk header to ensure it contains UTF-8 valid data · 9d83a2b0
The diff driver truncates the hunk header text to 80 bytes, which can truncate 4-byte Unicode characters and introduce garbage characters in the diff output. This change sanitizes the hunk header before it is displayed. This mirrors the test in git: https://github.com/git/git/blob/master/t/t4025-hunk-header.sh Closes https://github.com/libgit2/rugged/issues/716
Stan Hu committed