Fix a bug where commits with no children weren't marked as on-screen.
authorPaul Mackerras <paulus@samba.org>
Fri, 19 Aug 2005 00:22:04 +0000 (10:22 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 19 Aug 2005 00:22:04 +0000 (10:22 +1000)
This problem was revealed by running gitk --all on Wolfgang Denk's
u-boot repository.

gitk

diff --git a/gitk b/gitk
index 33abcc4a252ee00dcd437b85c478697266b48f3f..0767695e2a24286d54af2ff14968dc1c2ffe6b4f 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -1019,6 +1019,7 @@ proc drawslants {id needonscreen nohs} {
     }
     if {$onscreen($id) == 0} {
        lappend displist $id
+       set onscreen($id) 1
     }
 
     # remove the null entry if present
@@ -1186,15 +1187,10 @@ proc drawslants {id needonscreen nohs} {
                set j [lsearch -exact $displist $id]
            }
            if {$j != $i || $xspc1($lineno) != $xspc1($lj)
-               || ($olddlevel <= $i && $i <= $dlevel)
-               || ($dlevel <= $i && $i <= $olddlevel)} {
+               || ($olddlevel < $i && $i < $dlevel)
+               || ($dlevel < $i && $i < $olddlevel)} {
                set xj [xcoord $j $dlevel $lj]
-               set dx [expr {abs($xi - $xj)}]
-               set yb $y2
-               if {0 && $dx < $linespc} {
-                   set yb [expr {$y1 + $dx}]
-               }
-               lappend mainline($id) $xi $y1 $xj $yb
+               lappend mainline($id) $xi $y1 $xj $y2
            }
        }
     }