diff options
author | Mark Levedahl <mlevedahl@gmail.com> | 2025-05-18 10:41:30 -0400 |
---|---|---|
committer | Mark Levedahl <mlevedahl@gmail.com> | 2025-07-16 23:02:38 -0400 |
commit | ac222bc02df9aef49d4a6ee839762c2902961a21 (patch) | |
tree | a7a9be041c261f68dffeda62fa124e346bcf0e56 /commit-graph.c | |
parent | aa1b8d31acbcc7630e1ca2f2bbd27eeb34b00446 (diff) |
gitk: use -profile tcl8 on encoding conversions
gitk in the prior commit learned to apply -profile tcl8 to all input
data streams, avoiding errors on non-binary data streams whose encoding
is not utf-8. But, gitk also consumes binary data streams (generally blobs
from commits), and internally decodes this to support various displays.
With Tcl9, errors occur in this decoding for the same reasons described
in the previous commit: basically, the underlying data was not validated
to conform to the given encoding, and this source encoding may not be
utf-8. gitk performs this decoding using Tcl's '[encoding convert from'
operator.
For example, the 7th commit in gitk's history has the extended ascii
value 0xA9, so
gitk 9a40c50c1e
in gitk's repository raises an exception. The error log has:
unexpected byte sequence starting at index 11: '\xA9'
while executing
"encoding convertfrom $diffencoding $line"
(procedure "parseblobdiffline" line 135)
invoked from within
"parseblobdiffline $ids $line"
(procedure "getblobdiffline" line 16)
invoked from within
"getblobdiffline file6 9a40c50c1e05c0658b7a7c68b56d615eb6f170dd"
("eval" body line 1)
invoked from within
"eval $script"
(procedure "dorunq" line 11)
invoked from within
"dorunq"
("after" script)
This problem has a similar fix to the prior issue: we must use the tlc8
profile when converting this data. Do so, again only on Tcl9 as Tcl8.6
does not recognize -profile, and only Tcl 9.0 makes strict the default.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions