{"thread":{"id":"46483","subject":"[PATCH] gitk: different color for boundary commits","startedAt":"2017-07-29T10:05:17Z","lastAt":"2017-08-25T08:26:01Z","messageCount":2,"participants":["Stefan Dotterweich","Stefan Haller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"325241","messageId":"6d65267a-1811-8c25-dd59-98fa5ef19655@gmx.de","threadId":"46483","inReplyTo":null,"subject":"[PATCH] gitk: different color for boundary commits","fromName":"Stefan Dotterweich","fromEmail":"stefandotterweich@gmx.de","sentAt":"2017-07-29T10:21:54Z","receivedAt":"2017-07-29T10:05:17Z","isPatch":true,"sender":{"key":"stefandotterweich@gmx.de","avatar":"https://avatars.githubusercontent.com/u/1097029?v=4"},"body":"When using filters, the commit list shows not only commits matching\nthe filter criteria, but also boundary commits. When going through a\nlist of say, all commits changing the variable `foo`, often half of\nthe displayed commits are boundary commits. In this case the boundary\ncommits are of little interest.\n\nHowever, there is no way to hide them or quickly distinguish them from\nthe actual commits.  Boundary commits can be identified by the white\ncolor inside the circle, but that is not easily recognisable.  On each\nline you  have to look at the circle color to identify the commit\ntype. This makes it hard to just quickly skim a list of commits,\nespecially when looking at dates and authors which are further to the\nright.\n\nTherefore, to make boundary commits easier to recognise, display their\ntext in a different color.\n\nSigned-off-by: Stefan Dotterweich <stefandotterweich@gmx.de>\n---\n I made this change for myself, but it would be nice to see it in the\n official build.\n\n gitk-git/gitk | 12 ++++++++----\n 1 file changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex a14d7a16b..8f5e0df75 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -6115,7 +6115,7 @@ proc drawcmittext {id row col} {\n     global canvxmax boldids boldnameids fgcolor markedid\n     global mainheadid nullid nullid2 circleitem circlecolors ctxbut\n     global mainheadcirclecolor workingfilescirclecolor indexcirclecolor\n-    global circleoutlinecolor\n+    global circleoutlinecolor uifgdisabledcolor\n \n     # listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right\n     set listed $cmitlisted($curview,$id)\n@@ -6128,6 +6128,10 @@ proc drawcmittext {id row col} {\n     } else {\n \tset ofill [lindex $circlecolors $listed]\n     }\n+    set textcolor $fgcolor\n+    if {$listed eq 0} {\n+\tset textcolor $uifgdisabledcolor\n+    }\n     set x [xc $row $col]\n     set y [yc $row]\n     set orad [expr {$linespc / 3}]\n@@ -6189,12 +6193,12 @@ proc drawcmittext {id row col} {\n \t    set nfont mainfontbold\n \t}\n     }\n-    set linehtag($id) [$canv create text $xt $y -anchor w -fill $fgcolor \\\n+    set linehtag($id) [$canv create text $xt $y -anchor w -fill $textcolor \\\n \t\t\t   -text $headline -font $font -tags text]\n     $canv bind $linehtag($id) $ctxbut \"rowmenu %X %Y $id\"\n-    set linentag($id) [$canv2 create text 3 $y -anchor w -fill $fgcolor \\\n+    set linentag($id) [$canv2 create text 3 $y -anchor w -fill $textcolor \\\n \t\t\t   -text $name -font $nfont -tags text]\n-    set linedtag($id) [$canv3 create text 3 $y -anchor w -fill $fgcolor \\\n+    set linedtag($id) [$canv3 create text 3 $y -anchor w -fill $textcolor \\\n \t\t\t   -text $date -font mainfont -tags text]\n     if {$selectedline == $row} {\n \tmake_secsel $id\n-- \n2.12.0\n\n"},{"id":"327174","messageId":"1nbb55y.15cu111u8kiwwM%lists@haller-berlin.de","threadId":"46483","inReplyTo":"6d65267a-1811-8c25-dd59-98fa5ef19655@gmx.de","subject":"Re: [PATCH] gitk: different color for boundary commits","fromName":"Stefan Haller","fromEmail":"lists@haller-berlin.de","sentAt":"2017-08-25T08:16:20Z","receivedAt":"2017-08-25T08:26:01Z","isPatch":true,"sender":{"key":"lists@haller-berlin.de","avatar":null},"body":"Stefan Dotterweich <stefandotterweich@gmx.de> wrote:\n\n> When using filters, the commit list shows not only commits matching\n> the filter criteria, but also boundary commits. When going through a\n> list of say, all commits changing the variable `foo`, often half of\n> the displayed commits are boundary commits. In this case the boundary\n> commits are of little interest.\n> \n> However, there is no way to hide them or quickly distinguish them from\n> the actual commits.  Boundary commits can be identified by the white\n> color inside the circle, but that is not easily recognisable.  On each\n> line you  have to look at the circle color to identify the commit\n> type. This makes it hard to just quickly skim a list of commits,\n> especially when looking at dates and authors which are further to the\n> right.\n> \n> Therefore, to make boundary commits easier to recognise, display their\n> text in a different color.\n\nI would like to go one step further and not show the boundary commits at\nall. Why do we need them again? (I think this has been discussed before,\nbut I can't find it right now. The only reference I could find is this\nthread: <https://public-inbox.org/git/571F6852.1070405@qt.io/T/#u>,\nwhich doesn't explain *why* gitk shows the boundary commits in the first\nplace.)\n\nIn my opinion, when saying \"gitk --author=foo\", the list of commits in\nthe top pane should look the same as the ouput of \n\"git log --oneline --author=foo\".\n\n\n-- \nStefan Haller\nBerlin, Germany\nhttp://www.haller-berlin.de/\n"}]}