Skip to content

Commit 1f2cecf

Browse files
navytuxpaulusmack
authored andcommitted
gitk: Display submodule diffs with appropriate encoding
Previously, when submodule commit headings contained non-latin-1 characters, they were displayed incorrectly in gitk, because $line was not properly decoded, for example: ----------------------------- Documentation/Dokko ----------------------------- Submodule Documentation/Dokko 2ca20c7..0ea204d: > Ð�Ñ�оÑ�околÑ� Ñ�опÑ�Ñ�жениÑ� Ð�Ð�С "Ð�оÑ�Ñ�ик-21631" (Ð�Ð�2 и Сандал) > hardware: докÑ�менÑ�аÑ�иÑ� на InnoDisk SATA 10000 > hardware: докÑ�менÑ�аÑ�иÑ� на IEI PCISA-6770E2 v3.0 > hardware: докÑ�менÑ�аÑ�иÑ� на Fastwel NIB941 > hardware: докÑ�менÑ�аÑ�иÑ� на IEI IPX-9S > hardware: докÑ�менÑ�аÑ�иÑ� на Hirschmann 5TX-EEC instead of ----------------------------- Documentation/Dokko ----------------------------- Submodule Documentation/Dokko 2ca20c7..0ea204d: > Протоколы сопряжения ИМС "Мостик-21631" (ЛИ2 и Сандал) > hardware: документация на InnoDisk SATA 10000 > hardware: документация на IEI PCISA-6770E2 v3.0 > hardware: документация на Fastwel NIB941 > hardware: документация на IEI IPX-9S > hardware: документация на Hirschmann 5TX-EEC This fixes it. Signed-off-by: Kirill Smelkov <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent fcacf48 commit 1f2cecf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7689,8 +7689,10 @@ proc getblobdiffline {bdf ids} {
76897689
makediffhdr $fname $ids
76907690
$ctext insert end "\n$line\n" filesep
76917691
} elseif {![string compare -length 3 " >" $line]} {
7692+
set line [encoding convertfrom $diffencoding $line]
76927693
$ctext insert end "$line\n" dresult
76937694
} elseif {![string compare -length 3 " <" $line]} {
7695+
set line [encoding convertfrom $diffencoding $line]
76947696
$ctext insert end "$line\n" d0
76957697
} elseif {$diffinhdr} {
76967698
if {![string compare -length 12 "rename from " $line]} {

0 commit comments

Comments
 (0)