Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
be44aee7
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
be44aee7
编写于
10月 20, 2016
作者:
P
Pat Thoyts
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'kb/unicode' into pu
上级
12d29c32
ae75e1e4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
30 deletion
+12
-30
git-gui.sh
git-gui.sh
+8
-26
lib/browser.tcl
lib/browser.tcl
+1
-1
lib/index.tcl
lib/index.tcl
+3
-3
未找到文件。
git-gui.sh
浏览文件 @
be44aee7
...
@@ -534,28 +534,10 @@ proc _lappend_nice {cmd_var} {
...
@@ -534,28 +534,10 @@ proc _lappend_nice {cmd_var} {
}
}
proc git
{
args
}
{
proc git
{
args
}
{
set
opt
[
list]
set
fd
[
eval
[
list git_read]
$args
]
fconfigure
$fd
-translation
binary
-encoding
utf-8
while
{
1
}
{
set
result
[
string trimright
[
read
$fd
]
"
\n
"
]
switch
--
[
lindex
$args
0]
{
close
$fd
--nice
{
_lappend_nice opt
}
default
{
break
}
}
set
args
[
lrange
$args
1 end]
}
set
cmdp
[
_git_cmd
[
lindex
$args
0]]
set
args
[
lrange
$args
1 end]
_trace_exec
[
concat
$opt
$cmdp
$args
]
set
result
[
eval exec
$opt
$cmdp
$args
]
if
{
$:
:_trace
}
{
if
{
$:
:_trace
}
{
puts stderr
"<
$result
"
puts stderr
"<
$result
"
}
}
...
@@ -1111,7 +1093,7 @@ git-version proc _parse_config {arr_name args} {
...
@@ -1111,7 +1093,7 @@ git-version proc _parse_config {arr_name args} {
[list git_read config]
\
[list git_read config]
\
$args
\
$args
\
[list --null --list]]
[list --null --list]]
fconfigure
$fd_rc
-translation binary
fconfigure
$fd_rc
-translation binary
-encoding utf-8
set buf [read
$fd_rc
]
set buf [read
$fd_rc
]
close
$fd_rc
close
$fd_rc
}
}
...
@@ -1691,7 +1673,7 @@ proc read_diff_index {fd after} {
...
@@ -1691,7 +1673,7 @@ proc read_diff_index {fd after} {
set i [split [string range
$buf_rdi
$c
[expr {
$z1
- 2}]] { }]
set i [split [string range
$buf_rdi
$c
[expr {
$z1
- 2}]] { }]
set p [string range
$buf_rdi
$z1
[expr {
$z2
- 1}]]
set p [string range
$buf_rdi
$z1
[expr {
$z2
- 1}]]
merge_state
\
merge_state
\
[encoding convertfrom
$p
]
\
[encoding convertfrom
utf-8
$p
]
\
[lindex
$i
4]?
\
[lindex
$i
4]?
\
[list [lindex
$i
0] [lindex
$i
2]]
\
[list [lindex
$i
0] [lindex
$i
2]]
\
[list]
[list]
...
@@ -1724,7 +1706,7 @@ proc read_diff_files {fd after} {
...
@@ -1724,7 +1706,7 @@ proc read_diff_files {fd after} {
set i [split [string range
$buf_rdf
$c
[expr {
$z1
- 2}]] { }]
set i [split [string range
$buf_rdf
$c
[expr {
$z1
- 2}]] { }]
set p [string range
$buf_rdf
$z1
[expr {
$z2
- 1}]]
set p [string range
$buf_rdf
$z1
[expr {
$z2
- 1}]]
merge_state
\
merge_state
\
[encoding convertfrom
$p
]
\
[encoding convertfrom
utf-8
$p
]
\
?[lindex
$i
4]
\
?[lindex
$i
4]
\
[list]
\
[list]
\
[list [lindex
$i
0] [lindex
$i
2]]
[list [lindex
$i
0] [lindex
$i
2]]
...
@@ -1747,7 +1729,7 @@ proc read_ls_others {fd after} {
...
@@ -1747,7 +1729,7 @@ proc read_ls_others {fd after} {
set pck [split
$buf_rlo
"
\0
"]
set pck [split
$buf_rlo
"
\0
"]
set buf_rlo [lindex
$pck
end]
set buf_rlo [lindex
$pck
end]
foreach p [lrange
$pck
0 end-1] {
foreach p [lrange
$pck
0 end-1] {
set p [encoding convertfrom
$p
]
set p [encoding convertfrom
utf-8
$p
]
if {[string index
$p
end] eq {/}} {
if {[string index
$p
end] eq {/}} {
set p [string range
$p
0 end-1]
set p [string range
$p
0 end-1]
}
}
...
...
lib/browser.tcl
浏览文件 @
be44aee7
...
@@ -197,7 +197,7 @@ method _ls {tree_id {name {}}} {
...
@@ -197,7 +197,7 @@ method _ls {tree_id {name {}}} {
$w
conf -state disabled
$w
conf -state disabled
set fd
[
git_read ls-tree -z $tree_id
]
set fd
[
git_read ls-tree -z $tree_id
]
fconfigure $fd -blocking 0 -translation binary -encoding
binary
fconfigure $fd -blocking 0 -translation binary -encoding
utf-8
fileevent $fd readable
[
cb _read $fd
]
fileevent $fd readable
[
cb _read $fd
]
}
}
...
...
lib/index.tcl
浏览文件 @
be44aee7
...
@@ -115,7 +115,7 @@ proc write_update_indexinfo {fd pathList totalCnt batch after} {
...
@@ -115,7 +115,7 @@ proc write_update_indexinfo {fd pathList totalCnt batch after} {
set info
[
lindex $s 2
]
set info
[
lindex $s 2
]
if
{
$info
eq
{}}
continue
if
{
$info
eq
{}}
continue
puts -nonewline $fd
"
$info
\t
[
encoding convertto $path
]
\0
"
puts -nonewline $fd
"
$info
\t
[
encoding convertto
utf-8
$path
]
\0
"
display_file $path $new
display_file $path $new
}
}
...
@@ -186,7 +186,7 @@ proc write_update_index {fd pathList totalCnt batch after} {
...
@@ -186,7 +186,7 @@ proc write_update_index {fd pathList totalCnt batch after} {
?M
{
set new M_
}
?M
{
set new M_
}
??
{
continue
}
??
{
continue
}
}
}
puts -nonewline $fd
"
[
encoding convertto $path
]
\0
"
puts -nonewline $fd
"
[
encoding convertto
utf-8
$path
]
\0
"
display_file $path $new
display_file $path $new
}
}
...
@@ -247,7 +247,7 @@ proc write_checkout_index {fd pathList totalCnt batch after} {
...
@@ -247,7 +247,7 @@ proc write_checkout_index {fd pathList totalCnt batch after} {
?M -
?M -
?T -
?T -
?D
{
?D
{
puts -nonewline $fd
"
[
encoding convertto $path
]
\0
"
puts -nonewline $fd
"
[
encoding convertto
utf-8
$path
]
\0
"
display_file $path ?_
display_file $path ?_
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录