From: Stefan Dotterweich Date: Sat, 4 Jun 2016 08:47:16 +0000 (+0200) Subject: gitk: Fix missing commits when using -S or -G X-Git-Tag: v2.12.0-rc0~77^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d92aa57039cf2e4acae6aedfe4a4d6bf39562763;p=thirdparty%2Fgit.git gitk: Fix missing commits when using -S or -G When -S or -G is used as a filter option, the resulting commit list rarely contains all matching commits. Only a certain number of commits are displayed and the rest are missing. "git log --boundary -S" does not return as many boundary commits as you might expect. gitk makes up for this in closevarcs() by adding missing parent (boundary) commits. However, it does not change $numcommits, which limits how many commits are shown. In the end, some commits at the end of the commit list are simply not shown. Change $numcommits whenever a missing parent is added to the current view. Signed-off-by: Stefan Dotterweich Signed-off-by: Paul Mackerras --- diff --git a/gitk b/gitk index c60f180941..4d531b335a 100755 --- 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] } }