Skip to content

Commit c698805

Browse files
committed
fix: when resolving merge conflicts, japanese file names become garbled.
Signed-off-by: Kazuhiro Kato <[email protected]>
1 parent d33fb3d commit c698805

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitk-git/gitk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8205,12 +8205,13 @@ proc parseblobdiffline {ids line} {
82058205

82068206
if {$type eq "--cc"} {
82078207
# start of a new file in a merge diff
8208-
set fname [string range $line 10 end]
8208+
set fname_raw [string range $line 10 end]
8209+
set fname [encoding convertfrom $fname_raw]
82098210
if {[lsearch -exact $treediffs($ids) $fname] < 0} {
82108211
lappend treediffs($ids) $fname
82118212
add_flist [list $fname]
82128213
}
8213-
8214+
set fname $fname_raw
82148215
} else {
82158216
set line [string range $line 11 end]
82168217
# If the name hasn't changed the length will be odd,
@@ -8310,6 +8311,7 @@ proc parseblobdiffline {ids line} {
83108311
set diffinhdr 0
83118312
return
83128313
}
8314+
set line [encoding convertfrom $line]
83138315
$ctext insert end "$line\n" filesep
83148316

83158317
} else {

0 commit comments

Comments
 (0)