@@ -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
@@ -540,14 +550,17 @@ proc start_rev_list {view} {
540
550
if {$revs eq {}} {
541
551
return 0
542
552
}
543
- set args [ concat $vflags($view) $revs ]
553
+ set args $vflags($view)
544
554
} else {
555
+ set revs {}
545
556
set args $vorigargs($view)
546
557
}
547
558
548
559
if {[ catch {
549
560
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
550
- --parents --boundary $args " --" $files ] r]
561
+ --parents --boundary $args --stdin \
562
+ " <<[ join [concat $revs " --" \
563
+ [escape_filter_paths $files ] ] " \\ n" ]" ] r]
551
564
} err]} {
552
565
error_popup " [mc " Error executing git log:" ] $err "
553
566
return 0
@@ -689,13 +702,20 @@ proc updatecommits {} {
689
702
set revs $newrevs
690
703
set vposids($view ) [ lsort -unique [concat $oldpos $vposids($view) ] ]
691
704
}
692
- set args [ concat $vflags($view) $revs --not $oldpos ]
705
+ set args $vflags($view)
706
+ foreach r $oldpos {
707
+ lappend revs " ^$r "
708
+ }
693
709
} else {
710
+ set revs {}
694
711
set args $vorigargs($view)
695
712
}
696
713
if {[ catch {
697
714
set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
698
- --parents --boundary $args " --" $vfilelimit($view) ] r]
715
+ --parents --boundary $args --stdin \
716
+ " <<[ join [concat $revs " --" \
717
+ [escape_filter_paths \
718
+ $vfilelimit($view) ] ] " \\ n" ]" ] r]
699
719
} err]} {
700
720
error_popup " [mc " Error executing git log:" ] $err "
701
721
return
@@ -10366,10 +10386,16 @@ proc getallcommits {} {
10366
10386
foreach id $seeds {
10367
10387
lappend ids " ^$id "
10368
10388
}
10389
+ lappend ids " --"
10369
10390
}
10370
10391
}
10371
10392
if {$ids ne {}} {
10372
- set fd [ open [concat $cmd $ids ] r]
10393
+ if {$ids eq " --all" } {
10394
+ set cmd [ concat $cmd " --all" ]
10395
+ } else {
10396
+ set cmd [ concat $cmd --stdin " <<[ join $ids " \\ n" ] " ]
10397
+ }
10398
+ set fd [ open $cmd r]
10373
10399
fconfigure $fd -blocking 0
10374
10400
incr allcommits
10375
10401
nowbusy allcommits
0 commit comments