gitk: Fix missing commits when using -S or -G
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index c60f180941f192758008c8242e9aadb7039bb072..4d531b335a9a7d3f1448110c02c6141a20dc817a 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -1315,7 +1315,7 @@ proc commitonrow {row} {
 
 proc closevarcs {v} {
     global varctok varccommits varcid parents children
-    global cmitlisted commitidx vtokmod
+    global cmitlisted commitidx vtokmod curview numcommits
 
     set missing_parents 0
     set scripts {}
@@ -1340,6 +1340,9 @@ proc closevarcs {v} {
            }
            lappend varccommits($v,$b) $p
            incr commitidx($v)
+           if {$v == $curview} {
+               set numcommits $commitidx($v)
+           }
            set scripts [check_interest $p $scripts]
        }
     }