@@ -406,7 +406,7 @@ proc start_rev_list {view} {
406
406
if {$revs eq {}} {
407
407
return 0
408
408
}
409
- set args [concat $vflags($view) $revs ]
409
+ set args [limit_arg_length [ concat $vflags($view) $revs ] ]
410
410
} else {
411
411
set args $vorigargs($view)
412
412
}
@@ -10057,18 +10057,7 @@ proc getallcommits {} {
10057
10057
}
10058
10058
}
10059
10059
if {$ids ne {}} {
10060
- set cmd [concat $cmd $ids ]
10061
- # The maximum command line length for the CreateProcess function is 32767 characters, see
10062
- # http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx
10063
- # Be a little conservative in case Tcl adds some more stuff to the command line we do not
10064
- # know about and truncate the command line at a SHA1-boundary below 32000 characters.
10065
- if {[tk windowingsystem] == " win32" &&
10066
- [string length $cmd ] > 32000} {
10067
- set ndx [string last " " $cmd 32000]
10068
- if {$ndx != -1} {
10069
- set cmd [string range $cmd 0 $ndx ]
10070
- }
10071
- }
10060
+ set cmd [limit_arg_length [concat $cmd $ids ]]
10072
10061
set fd [open $cmd r]
10073
10062
fconfigure $fd -blocking 0
10074
10063
incr allcommits
@@ -10079,6 +10068,21 @@ proc getallcommits {} {
10079
10068
}
10080
10069
}
10081
10070
10071
+ # The maximum command line length for the CreateProcess function is 32767 characters, see
10072
+ # http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx
10073
+ # Be a little conservative in case Tcl adds some more stuff to the command line we do not
10074
+ # know about and truncate the command line at a SHA1-boundary below 32000 characters.
10075
+ proc limit_arg_length {cmd} {
10076
+ if {[tk windowingsystem] == " win32" &&
10077
+ [string length $cmd ] > 32000} {
10078
+ set ndx [string last " " $cmd 32000]
10079
+ if {$ndx != -1} {
10080
+ return [string range $cmd 0 $ndx ]
10081
+ }
10082
+ }
10083
+ return $cmd
10084
+ }
10085
+
10082
10086
# Since most commits have 1 parent and 1 child, we group strings of
10083
10087
# such commits into "arcs" joining branch/merge points (BMPs), which
10084
10088
# are commits that either don't have 1 parent or don't have 1 child.
0 commit comments