File tree Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -526,31 +526,10 @@ proc _lappend_nice {cmd_var} {
526
526
}
527
527
528
528
proc git {args} {
529
- set opt [ list ]
530
-
531
- while {1} {
532
- switch -- [ lindex $args 0] {
533
- --nice {
534
- _lappend_nice opt
535
- }
536
-
537
- default {
538
- break
539
- }
540
-
541
- }
542
-
543
- set args [ lrange $args 1 end]
544
- }
545
-
546
- set cmdp [ _git_cmd [lindex $args 0] ]
547
- set args [ lrange $args 1 end]
548
-
549
- _trace_exec [ concat $opt $cmdp $args ]
550
- set result [ eval exec $opt $cmdp $args ]
551
- if {[ encoding system] != " utf-8" } {
552
- set result [ encoding convertfrom utf-8 [encoding convertto $result ] ]
553
- }
529
+ set fd [ eval [list git_read] $args ]
530
+ fconfigure $fd -translation binary -encoding utf-8
531
+ set result [ string trimright [read $fd ] " \n " ]
532
+ close $fd
554
533
if {$::_trace } {
555
534
puts stderr " < $result "
556
535
}
You can’t perform that action at this time.
0 commit comments