aboutsummaryrefslogtreecommitdiffstats
path: root/git.c
diff options
context:
space:
mode:
authorKyle J. McKay <mackyle@gmail.com>2015-04-03 15:15:14 -0700
committerJunio C Hamano <gitster@pobox.com>2015-04-04 13:03:45 -0700
commit8d00662d7d263448d90637ef6758fd2a0b526fec (patch)
treee89e18e80989c9f6831379237c76b954523f97c8 /git.c
parentparse_color: fix return value for numeric color values 0-8 (diff)
downloadgit-8d00662d7d263448d90637ef6758fd2a0b526fec.tar.gz
git-8d00662d7d263448d90637ef6758fd2a0b526fec.zip
diff-highlight: do not split multibyte characters
When the input is UTF-8 and Perl is operating on bytes instead of characters, a diff that changes one multibyte character to another that shares an initial byte sequence will result in a broken diff display as the common byte sequence prefix will be separated from the rest of the bytes in the multibyte character. For example, if a single line contains only the unicode character U+C9C4 (encoded as UTF-8 0xEC, 0xA7, 0x84) and that line is then changed to the unicode character U+C9C0 (encoded as UTF-8 0xEC, 0xA7, 0x80), when operating on bytes diff-highlight will show only the single byte change from 0x84 to 0x80 thus creating invalid UTF-8 and a broken diff display. Fix this by putting Perl into character mode when splitting the line and then back into byte mode after the split is finished. The utf8::xxx functions require Perl 5.8 so we require that as well. Also, since we are mucking with code in the split_line function, we change a '*' quantifier to a '+' quantifier when matching the $COLOR expression which has the side effect of speeding everything up while eliminating useless '' elements in the returned array. Reported-by: Yi EungJun <semtlenori@gmail.com> Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions
span class='deletions'>-12/+33 2019-03-19drm/amdgpu: Fix warning when lockdep is enabledxinhui pan1-0/+6 2019-03-19drm/amdgpu: Fix NULL pointer when ta is missingxinhui pan1-9/+15 2019-03-19drm/amdgpu: fix ras parameter descriptionsEvan Quan1-4/+4 2019-03-19drm/amdgpu: export both supported and enabled ras featuresxinhui pan1-2/+5 2019-03-19drm/amdgpu: lookup vbios table to check ecc capabilityxinhui pan1-27/+13 2019-03-19drm/amdgpu: query sram ecc/ecc availability from atombiosHawking Zhang1-205/+23 2019-03-19drm/amdgpu: add atomfirmware helper function to query sram ecc capsHawking Zhang2-0/+31 2019-03-19drm/amdgpu: add atomfirmware helper function to query ecc statusHawking Zhang2-0/+32 2019-03-19drm/amdgpu: update atomfirmware header with ecc related membersHawking Zhang1-0/+53 2019-03-19drm/amdgpu: handle ras resumexinhui pan3-3/+13 2019-03-19drm/amdkfd: add RAS ECC event support (v3)Eric Huang9-2/+51 2019-03-19drm/amdkfd: add RAS capabilities in topology for Vega20 (v2)Eric Huang2-0/+20 2019-03-19drm/amdgpu: add human readable debugfs control support (v2)xinhui pan1-13/+102 2019-03-19drm/amdgpu: skip gpu reset when ras error occuredxinhui pan1-0/+3 2019-03-19drm/amdgpu: add ioctl query for enabled ras features (v2)xinhui pan2-0/+41 2019-03-19drm/amdgpu: Add a new flag to AMDGPU_CTX_OP_QUERY_STATE2xinhui pan3-0/+22 2019-03-19drm/amdgpu: enable ras on gmc9xinhui pan2-0/+278 2019-03-19drm/amdgpu: enable ras on gfx9 (v2)Feifei Xu2-0/+176 2019-03-19drm/amdgpu: enable ras on sdma4xinhui pan2-1/+187 2019-03-19drm/amdgpu: reserve bad pages during recoveryxinhui pan1-0/+5 2019-03-19drm/amdgpu: add debugfs ctrl nodexinhui pan2-10/+121 2019-03-19drm/amdgpu: add amdgpu_ras.c to support ras (v2)xinhui pan5-1/+1475 2019-03-19drm/amdgpu: add psp cmd submit timeoutxinhui pan1-1/+5 2019-03-19drm/amdgpu: add psp v11 ras callbackxinhui pan1-0/+50 2019-03-19drm/amdgpu: add psp ras subsystem infrastructure (v2)xinhui pan2-0/+230 2019-03-19drm/amdgpu: add psp ras callback func and macroxinhui pan1-0/+11