File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,16 @@ proc parseviewrevs {view revs} {
488
488
return $ret
489
489
}
490
490
491
+ # Escapes a list of filter paths to be passed to git log via stdin. Note that
492
+ # paths must not be quoted.
493
+ proc escape_filter_paths {paths} {
494
+ set escaped [ list ]
495
+ foreach path $paths {
496
+ lappend escaped [ string map {\\ \\\\ " \ " " \\\ " } $path ]
497
+ }
498
+ return $escaped
499
+ }
500
+
491
501
# Start off a git log process and arrange to read its output
492
502
proc start_rev_list {view} {
493
503
global startmsecs commitidx viewcomplete curview
@@ -549,7 +559,8 @@ proc start_rev_list {view} {
549
559
if {[ catch {
550
560
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
551
561
--parents --boundary $args --stdin \
552
- " <<[ join [concat $revs " --" $files ] " \\ n" ]" ] r]
562
+ " <<[ join [concat $revs " --" \
563
+ [escape_filter_paths $files ] ] " \\ n" ]" ] r]
553
564
} err]} {
554
565
error_popup " [mc " Error executing git log:" ] $err "
555
566
return 0
@@ -703,7 +714,8 @@ proc updatecommits {} {
703
714
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
704
715
--parents --boundary $args --stdin \
705
716
" <<[ join [concat $revs " --" \
706
- $vfilelimit($view) ] " \\ n" ]" ] r]
717
+ [escape_filter_paths \
718
+ $vfilelimit($view) ] ] " \\ n" ]" ] r]
707
719
} err]} {
708
720
error_popup " [mc " Error executing git log:" ] $err "
709
721
return
You can’t perform that action at this time.
0 commit comments