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 @@ -354,6 +354,16 @@ proc parseviewrevs {view revs} {
354
354
return $ret
355
355
}
356
356
357
+ # Escapes a list of filter paths to be passed to git log via stdin. Note that
358
+ # paths must not be quoted.
359
+ proc escape_filter_paths {paths} {
360
+ set escaped [list ]
361
+ foreach path $paths {
362
+ lappend escaped [string map {\\ \\\\ " \ " " \\\ " } $path ]
363
+ }
364
+ return $escaped
365
+ }
366
+
357
367
# Start off a git log process and arrange to read its output
358
368
proc start_rev_list {view} {
359
369
global startmsecs commitidx viewcomplete curview
@@ -415,7 +425,8 @@ proc start_rev_list {view} {
415
425
if {[catch {
416
426
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
417
427
--parents --boundary $args --stdin \
418
- " <<[ join [concat $revs " --" $files ] " \\ n" ]" ] r]
428
+ " <<[ join [concat $revs " --" \
429
+ [escape_filter_paths $files ] ] " \\ n" ]" ] r]
419
430
} err]} {
420
431
error_popup " [ mc " Error executing git log:" ] $err "
421
432
return 0
@@ -569,7 +580,8 @@ proc updatecommits {} {
569
580
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
570
581
--parents --boundary $args --stdin \
571
582
" <<[ join [concat $revs " --" \
572
- $vfilelimit($view) ] " \\ n" ]" ] r]
583
+ [escape_filter_paths
584
+ $vfilelimit($view) ] ] " \\ n" ]" ] r]
573
585
} err]} {
574
586
error_popup " [ mc " Error executing git log:" ] $err "
575
587
return
You can’t perform that action at this time.
0 commit comments