@@ -493,7 +493,7 @@ proc parseviewrevs {view revs} {
493
493
proc escape_filter_paths {paths} {
494
494
set escaped [ list ]
495
495
foreach path $paths {
496
- lappend escaped [ string map {\\ \\\\ " \ " " \\\ " } $path ]
496
+ lappend escaped [ string map {\\ " / " } $path ]
497
497
}
498
498
return $escaped
499
499
}
@@ -558,9 +558,8 @@ proc start_rev_list {view} {
558
558
559
559
if {[ catch {
560
560
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
561
- --parents --boundary $args --stdin \
562
- " <<[ join [concat $revs " --" \
563
- [escape_filter_paths $files ] ] " \\ n" ]" ] r]
561
+ --parents --boundary $args \
562
+ [list $revs " --" [escape_filter_paths $files ] ]] r]
564
563
} err]} {
565
564
error_popup " [mc " Error executing git log:" ] $err "
566
565
return 0
@@ -712,10 +711,8 @@ proc updatecommits {} {
712
711
}
713
712
if {[ catch {
714
713
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
715
- --parents --boundary $args --stdin \
716
- " <<[ join [concat $revs " --" \
717
- [escape_filter_paths \
718
- $vfilelimit($view) ] ] " \\ n" ]" ] r]
714
+ --parents --boundary $args \
715
+ [list $revs " --" [escape_filter_paths $vfilelimit($view) ] ] r]]
719
716
} err]} {
720
717
error_popup " [mc " Error executing git log:" ] $err "
721
718
return
@@ -12742,11 +12739,17 @@ foreach arg $argv {
12742
12739
if {$selecthead eq " HEAD" } {
12743
12740
set selecthead {}
12744
12741
}
12742
+ proc capture_enc {cmd enc} {
12743
+ set f [ open " | $cmd " r]
12744
+ fconfigure $f -encoding $enc
12745
+ read $f
12746
+ }
12745
12747
12746
12748
if {$i >= [ llength $argv ] && $revtreeargs ne {}} {
12747
12749
# no -- on command line, but some arguments (other than --argscmd)
12748
12750
if {[ catch {
12749
- set f [eval exec git rev-parse --no-revs --no-flags $revtreeargs ]
12751
+ set f [capture_enc " git rev-parse --no-revs --no-flags $revtreeargs " utf-8]
12752
+ set f [ string trimright " $f " " \n " ]
12750
12753
set cmdline_files [ split $f " \n " ]
12751
12754
set n [ llength $cmdline_files ]
12752
12755
set revtreeargs [ lrange $revtreeargs 0 end-$n ]
0 commit comments