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