@@ -406,7 +406,7 @@ proc start_rev_list {view} {
406406 if {$revs eq {}} {
407407 return 0
408408 }
409- set args [limit_arg_length [ concat $vflags($view) $revs ] ]
409+ set args [concat $vflags($view) $revs ]
410410 } else {
411411 set args $vorigargs($view)
412412 }
@@ -10177,7 +10177,18 @@ proc getallcommits {} {
1017710177 }
1017810178 }
1017910179 if {$ids ne {}} {
10180- set cmd [limit_arg_length [concat $cmd $ids ]]
10180+ set cmd [concat $cmd $ids ]
10181+ # The maximum command line length for the CreateProcess function is 32767 characters, see
10182+ # http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx
10183+ # Be a little conservative in case Tcl adds some more stuff to the command line we do not
10184+ # know about and truncate the command line at a SHA1-boundary below 32000 characters.
10185+ if {[tk windowingsystem] == " win32" &&
10186+ [string length $cmd ] > 32000} {
10187+ set ndx [string last " " $cmd 32000]
10188+ if {$ndx != -1} {
10189+ set cmd [string range $cmd 0 $ndx ]
10190+ }
10191+ }
1018110192 set fd [open $cmd r]
1018210193 fconfigure $fd -blocking 0
1018310194 incr allcommits
@@ -10188,21 +10199,6 @@ proc getallcommits {} {
1018810199 }
1018910200}
1019010201
10191- # The maximum command line length for the CreateProcess function is 32767 characters, see
10192- # http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx
10193- # Be a little conservative in case Tcl adds some more stuff to the command line we do not
10194- # know about and truncate the command line at a SHA1-boundary below 32000 characters.
10195- proc limit_arg_length {cmd} {
10196- if {[tk windowingsystem] == " win32" &&
10197- [string length $cmd ] > 32000} {
10198- set ndx [string last " " $cmd 32000]
10199- if {$ndx != -1} {
10200- return [string range $cmd 0 $ndx ]
10201- }
10202- }
10203- return $cmd
10204- }
10205-
1020610202# Since most commits have 1 parent and 1 child, we group strings of
1020710203# such commits into "arcs" joining branch/merge points (BMPs), which
1020810204# are commits that either don't have 1 parent or don't have 1 child.
0 commit comments