File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 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} {
354354 return $ret
355355}
356356
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+
357367# Start off a git log process and arrange to read its output
358368proc start_rev_list {view} {
359369 global startmsecs commitidx viewcomplete curview
@@ -415,7 +425,8 @@ proc start_rev_list {view} {
415425 if {[catch {
416426 set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
417427 --parents --boundary $args --stdin \
418- " <<[ join [concat $revs " --" $files ] " \\ n" ]" ] r]
428+ " <<[ join [concat $revs " --" \
429+ [escape_filter_paths $files ] ] " \\ n" ]" ] r]
419430 } err]} {
420431 error_popup " [ mc " Error executing git log:" ] $err "
421432 return 0
@@ -569,7 +580,8 @@ proc updatecommits {} {
569580 set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
570581 --parents --boundary $args --stdin \
571582 " <<[ join [concat $revs " --" \
572- $vfilelimit($view) ] " \\ n" ]" ] r]
583+ [escape_filter_paths
584+ $vfilelimit($view) ] ] " \\ n" ]" ] r]
573585 } err]} {
574586 error_popup " [ mc " Error executing git log:" ] $err "
575587 return
You can’t perform that action at this time.
0 commit comments