mirror of
https://github.com/git/git.git
synced 2024-10-19 10:38:39 +02:00
gitk: fix branch name encoding error
After "git checkout -b '漢字'" to create a branch with UTF-8 character in it, "gitk" shows the branch name incorrectly, as it forgets to turn the bytes read from the "git show-ref" command into Unicode characters. Signed-off-by: Kazuhiro Kato <kato-k@ksysllc.co.jp> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
parent
b8b60957ce
commit
d4247e0602
4
gitk
4
gitk
@ -1780,11 +1780,15 @@ proc readrefs {} {
|
||||
global otherrefids idotherrefs mainhead mainheadid
|
||||
global selecthead selectheadid
|
||||
global hideremotes
|
||||
global tclencoding
|
||||
|
||||
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
|
||||
unset -nocomplain $v
|
||||
}
|
||||
set refd [open [list | git show-ref -d] r]
|
||||
if {$tclencoding != {}} {
|
||||
fconfigure $refd -encoding $tclencoding
|
||||
}
|
||||
while {[gets $refd line] >= 0} {
|
||||
if {[string index $line 40] ne " "} continue
|
||||
set id [string range $line 0 39]
|
||||
|
Loading…
Reference in New Issue
Block a user