Apparently this simplifies things for the parser/compiler and makes
it go slightly faster (since without the braces, it potentially has
to do two levels of substitutions rather than one).
Signed-off-by: Paul Mackerras <paulus@samba.org>
proc parse_args {rargs} {
global parsed_args
proc parse_args {rargs} {
global parsed_args
set parse_args [concat --default HEAD $rargs]
set parsed_args [split [eval exec git-rev-parse $parse_args] "\n"]
set parse_args [concat --default HEAD $rargs]
set parsed_args [split [eval exec git-rev-parse $parse_args] "\n"]
# if git-rev-parse failed for some reason...
if {$rargs == {}} {
set rargs HEAD
# if git-rev-parse failed for some reason...
if {$rargs == {}} {
set rargs HEAD
set startmsecs [clock clicks -milliseconds]
set nextupdate [expr {$startmsecs + 100}]
set ncmupdate 1
set startmsecs [clock clicks -milliseconds]
set nextupdate [expr {$startmsecs + 100}]
set ncmupdate 1
set commfd [open [concat | git-rev-list --header --topo-order \
--parents $rlargs] r]
set commfd [open [concat | git-rev-list --header --topo-order \
--parents $rlargs] r]
puts stderr "Error executing git-rev-list: $err"
exit 1
}
puts stderr "Error executing git-rev-list: $err"
exit 1
}
- if [catch {set contents [exec git-cat-file commit $id]}] return
+ if {[catch {set contents [exec git-cat-file commit $id]}]} return
parsecommit $id $contents 0 {}
}
parsecommit $id $contents 0 {}
}
proc resizeclistpanes {win w} {
global oldwidth
proc resizeclistpanes {win w} {
global oldwidth
- if [info exists oldwidth($win)] {
+ if {[info exists oldwidth($win)]} {
set s0 [$win sash coord 0]
set s1 [$win sash coord 1]
if {$w < 60} {
set s0 [$win sash coord 0]
set s1 [$win sash coord 1]
if {$w < 60} {
proc resizecdetpanes {win w} {
global oldwidth
proc resizecdetpanes {win w} {
global oldwidth
- if [info exists oldwidth($win)] {
+ if {[info exists oldwidth($win)]} {
set s0 [$win sash coord 0]
if {$w < 60} {
set sash0 [expr {int($w*3/4 - 2)}]
set s0 [$win sash coord 0]
if {$w < 60} {
set sash0 [expr {int($w*3/4 - 2)}]
global parents nparents children nchildren
global cornercrossings crossings
global parents nparents children nchildren
global cornercrossings crossings
- if [info exists colormap($id)] return
+ if {[info exists colormap($id)]} return
set ncolors [llength $colors]
if {$nparents($id) <= 1 && $nchildren($id) == 1} {
set child [lindex $children($id) 0]
set ncolors [llength $colors]
if {$nparents($id) <= 1 && $nchildren($id) == 1} {
set child [lindex $children($id) 0]
global treediff parents treepending
set treepending $ids
set treediff {}
global treediff parents treepending
set treepending $ids
set treediff {}
- if [catch {set gdtf [open [concat | git-diff-tree --no-commit-id -r $ids] r]}] return
+ if {[catch \
+ {set gdtf [open [concat | git-diff-tree --no-commit-id -r $ids] r]} \
+ ]} return
fconfigure $gdtf -blocking 0
fileevent $gdtf readable [list gettreediffline $gdtf $ids]
}
fconfigure $gdtf -blocking 0
fileevent $gdtf readable [list gettreediffline $gdtf $ids]
}