File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-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
@@ -413,7 +423,9 @@ proc start_rev_list {view} {
413
423
414
424
if {[catch {
415
425
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
416
- --parents --boundary $args " --" $files ] r]
426
+ --parents --boundary $args --stdin \
427
+ " <<[ join [concat $revs " --" \
428
+ [escape_filter_paths $files ] ] " \\ n" ]" ] r]
417
429
} err]} {
418
430
error_popup " [ mc " Error executing git log:" ] $err "
419
431
return 0
@@ -561,7 +573,10 @@ proc updatecommits {} {
561
573
}
562
574
if {[catch {
563
575
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
564
- --parents --boundary $args " --" $vfilelimit($view) ] r]
576
+ --parents --boundary $args --stdin \
577
+ " <<[ join [concat $revs " --" \
578
+ [escape_filter_paths
579
+ $vfilelimit($view) ] ] " \\ n" ]" ] r]
565
580
} err]} {
566
581
error_popup " [ mc " Error executing git log:" ] $err "
567
582
return
You can’t perform that action at this time.
0 commit comments