{"thread":{"id":"42237","subject":"[PATCH] gitk: Fix missing commits when using -S or -G","startedAt":"2016-05-06T11:56:21Z","lastAt":"2016-12-12T01:58:41Z","messageCount":6,"participants":["Stefan Dotterweich","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"285682","messageId":"572C8665.8090707@gmx.de","threadId":"42237","inReplyTo":null,"subject":"[PATCH] gitk: Fix missing commits when using -S or -G","fromName":"Stefan Dotterweich","fromEmail":"stefandotterweich@gmx.de","sentAt":"2016-05-06T11:56:21Z","receivedAt":"2016-05-06T11:56:21Z","isPatch":true,"sender":{"key":"stefandotterweich@gmx.de","avatar":"https://avatars.githubusercontent.com/u/1097029?v=4"},"body":"When -S or -G is used as a filter option, the resulting commit list\nrarely contains all matching commits. Only a certain number of commits\nare displayed and the rest are missing.\n\n\"git log --boundary -S\" does not return as many boundary commits as you\nmight expect. gitk makes up for this in closevargs() by adding missing\nparent (boundary) commits. However, it does not change $numcommits,\nwhich limits how many commits are shown. In the end, some commits at the\nend of the commit list are simply not shown.\n\nChange $numcommits whenever a missing parent is added.\n\nSigned-off-by: Stefan Dotterweich <stefandotterweich@gmx.de>\n---\n gitk | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 805a1c7..b0da174 100755\n--- a/gitk\n+++ b/gitk\n@@ -1315,7 +1315,7 @@ proc commitonrow {row} {\n  proc closevarcs {v} {\n     global varctok varccommits varcid parents children\n-    global cmitlisted commitidx vtokmod\n+    global cmitlisted commitidx vtokmod numcommits\n      set missing_parents 0\n     set scripts {}\n@@ -1339,7 +1339,7 @@ proc closevarcs {v} {\n \t\tmodify_arc $v $b\n \t    }\n \t    lappend varccommits($v,$b) $p\n-\t    incr commitidx($v)\n+\t    set numcommits [incr commitidx($v)]\n \t    set scripts [check_interest $p $scripts]\n \t}\n     }\n-- \n2.7.4\n"},{"id":"285686","messageId":"572C8B36.2000106@gmx.de","threadId":"42237","inReplyTo":"572C8665.8090707@gmx.de","subject":"Re: [PATCH v2] gitk: Fix missing commits when using -S or -G","fromName":"Stefan Dotterweich","fromEmail":"stefandotterweich@gmx.de","sentAt":"2016-05-06T12:16:54Z","receivedAt":"2016-05-06T12:16:54Z","isPatch":true,"sender":{"key":"stefandotterweich@gmx.de","avatar":"https://avatars.githubusercontent.com/u/1097029?v=4"},"body":"When -S or -G is used as a filter option, the resulting commit list\nrarely contains all matching commits. Only a certain number of commits\nare displayed and the rest are missing.\n\n\"git log --boundary -S\" does not return as many boundary commits as you\nmight expect. gitk makes up for this in closevargs() by adding missing\nparent (boundary) commits. However, it does not change $numcommits,\nwhich limits how many commits are shown. In the end, some commits at the\nend of the commit list are simply not shown.\n\nChange $numcommits whenever a missing parent is added.\n\nSigned-off-by: Stefan Dotterweich <stefandotterweich@gmx.de>\n---\n gitk | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 805a1c7..b0da174 100755\n--- a/gitk\n+++ b/gitk\n@@ -1315,7 +1315,7 @@ proc commitonrow {row} {\n \n proc closevarcs {v} {\n     global varctok varccommits varcid parents children\n-    global cmitlisted commitidx vtokmod\n+    global cmitlisted commitidx vtokmod numcommits\n \n     set missing_parents 0\n     set scripts {}\n@@ -1339,7 +1339,7 @@ proc closevarcs {v} {\n \t\tmodify_arc $v $b\n \t    }\n \t    lappend varccommits($v,$b) $p\n-\t    incr commitidx($v)\n+\t    set numcommits [incr commitidx($v)]\n \t    set scripts [check_interest $p $scripts]\n \t}\n     }\n-- \n2.7.4\n"},{"id":"285903","messageId":"20160509034519.GC12515@fergus.ozlabs.ibm.com","threadId":"42237","inReplyTo":"572C8B36.2000106@gmx.de","subject":"Re: [PATCH v2] gitk: Fix missing commits when using -S or -G","fromName":"Paul Mackerras","fromEmail":"paulus@ozlabs.org","sentAt":"2016-05-09T03:45:19Z","receivedAt":"2016-05-09T03:45:19Z","isPatch":true,"sender":{"key":"paulus@ozlabs.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Fri, May 06, 2016 at 02:16:54PM +0200, Stefan Dotterweich wrote:\n> When -S or -G is used as a filter option, the resulting commit list\n> rarely contains all matching commits. Only a certain number of commits\n> are displayed and the rest are missing.\n> \n> \"git log --boundary -S\" does not return as many boundary commits as you\n> might expect. gitk makes up for this in closevargs() by adding missing\n> parent (boundary) commits. However, it does not change $numcommits,\n> which limits how many commits are shown. In the end, some commits at the\n> end of the commit list are simply not shown.\n> \n> Change $numcommits whenever a missing parent is added.\n\nNice catch; however, we should only update numcommits if the commits\nare for the current view, i.e. if $v == $curview.\n\nDo you want to update the patch?  If you prefer, I can update the\npatch and put a note in the commit message about the issue.\n\nPaul.\n"},{"id":"285905","messageId":"fea42c3e-a028-3204-690f-88843d31c264@gmx.de","threadId":"42237","inReplyTo":"20160509034519.GC12515@fergus.ozlabs.ibm.com","subject":"Re: [PATCH v2] gitk: Fix missing commits when using -S or -G","fromName":"Stefan Dotterweich","fromEmail":"stefandotterweich@gmx.de","sentAt":"2016-05-09T05:33:42Z","receivedAt":"2016-05-09T05:33:42Z","isPatch":true,"sender":{"key":"stefandotterweich@gmx.de","avatar":"https://avatars.githubusercontent.com/u/1097029?v=4"},"body":"> Nice catch; however, we should only update numcommits if the commits\n> are for the current view, i.e. if $v == $curview.\n>\n> Do you want to update the patch?  If you prefer, I can update the\n> patch and put a note in the commit message about the issue.\n\nSure, feel free to update the patch as you see fit.\n"},{"id":"288364","messageId":"1f857709-3c47-d4a1-b858-3288347416f8@gmx.de","threadId":"42237","inReplyTo":"fea42c3e-a028-3204-690f-88843d31c264@gmx.de","subject":"[PATCH v3] gitk: Fix missing commits when using -S or -G","fromName":"Stefan Dotterweich","fromEmail":"stefandotterweich@gmx.de","sentAt":"2016-06-04T08:47:16Z","receivedAt":"2016-06-04T08:47:16Z","isPatch":true,"sender":{"key":"stefandotterweich@gmx.de","avatar":"https://avatars.githubusercontent.com/u/1097029?v=4"},"body":"When -S or -G is used as a filter option, the resulting commit list\nrarely contains all matching commits. Only a certain number of commits\nare displayed and the rest are missing.\n\n\"git log --boundary -S\" does not return as many boundary commits as you\nmight expect. gitk makes up for this in closevargs() by adding missing\nparent (boundary) commits. However, it does not change $numcommits,\nwhich limits how many commits are shown. In the end, some commits at the\nend of the commit list are simply not shown.\n\nChange $numcommits whenever a missing parent is added.\n\nSigned-off-by: Stefan Dotterweich <stefandotterweich@gmx.de>\n---\n\nHere is an updated version of the patch. Feel free to change it if\nanything is missing.\n\n gitk-git/gitk | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 805a1c7..572da4a 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -1315,7 +1315,7 @@ proc commitonrow {row} {\n \n proc closevarcs {v} {\n     global varctok varccommits varcid parents children\n-    global cmitlisted commitidx vtokmod\n+    global cmitlisted commitidx vtokmod curview numcommits\n \n     set missing_parents 0\n     set scripts {}\n@@ -1340,6 +1340,9 @@ proc closevarcs {v} {\n \t    }\n \t    lappend varccommits($v,$b) $p\n \t    incr commitidx($v)\n+\t    if {$v == $curview} {\n+\t\tset numcommits $commitidx($v)\n+\t    }\n \t    set scripts [check_interest $p $scripts]\n \t}\n     }\n-- \n2.8.0\n"},{"id":"307481","messageId":"20161212003919.GE18316@fergus.ozlabs.ibm.com","threadId":"42237","inReplyTo":"1f857709-3c47-d4a1-b858-3288347416f8@gmx.de","subject":"Re: [PATCH v3] gitk: Fix missing commits when using -S or -G","fromName":"Paul Mackerras","fromEmail":"paulus@ozlabs.org","sentAt":"2016-12-12T00:39:19Z","receivedAt":"2016-12-12T01:58:41Z","isPatch":true,"sender":{"key":"paulus@ozlabs.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Sat, Jun 04, 2016 at 10:47:16AM +0200, Stefan Dotterweich wrote:\n> When -S or -G is used as a filter option, the resulting commit list\n> rarely contains all matching commits. Only a certain number of commits\n> are displayed and the rest are missing.\n> \n> \"git log --boundary -S\" does not return as many boundary commits as you\n> might expect. gitk makes up for this in closevargs() by adding missing\n> parent (boundary) commits. However, it does not change $numcommits,\n> which limits how many commits are shown. In the end, some commits at the\n> end of the commit list are simply not shown.\n> \n> Change $numcommits whenever a missing parent is added.\n> \n> Signed-off-by: Stefan Dotterweich <stefandotterweich@gmx.de>\n\nThanks, applied, with slight tweaks to the commit message.\n\nPaul.\n"}]}