@matheusbsbs / matheus-bagliano / commits / 69c0b5d240
Fork 0

gitk: Fix bug in the anc_or_desc routine

I missed the case where both nodes have no children and therefore have no incoming arcs. This fixes it. Signed-off-by: Paul Mackerras <paulus@samba.org>

Paul Mackerras committed Jul 4, 2007 at 21:57 UTC 69c0b5d2408cfe207f2976fc99cbe71208ba83ad
1 file changed +2 -1
gitk
+2 -1
@@ -6261,7 +6261,8 @@ proc anc_or_desc {a b} {
6261 # Both are on the same arc(s); either both are the same BMP,
6262 # or if one is not a BMP, the other is also not a BMP or is
6263 # the BMP at end of the arc (and it only has 1 incoming arc).
6264 - if {$a eq $b} {
6264 + # Or both can be BMPs with no incoming arcs.
6265 + if {$a eq $b || $arcnos($a) eq {}} {
6266 return 0
6267 }
6268 # assert {[llength $arcnos($a)] == 1}