{"thread":{"id":"44735","subject":"[PATCH 01/13] gitk: when processing tag labels, don't use `marks` as scratch space","startedAt":"2016-12-19T16:46:19Z","lastAt":"2017-02-06T17:13:25Z","messageCount":24,"participants":["Michael Haggerty","Philip Oakley","Marc Branchaud","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":13},"messages":[{"id":"308040","messageId":"3f3d03e45f75acfdbbe8b51040b7e0932c926acb.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 01/13] gitk: when processing tag labels, don't use `marks` as scratch space","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:00Z","receivedAt":"2016-12-19T16:46:19Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Instead, just append to it as necessary.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex a14d7a1..296efb3 100755\n--- a/gitk\n+++ b/gitk\n@@ -6570,18 +6570,20 @@ proc drawtags {id x xt y1} {\n     set extra [expr {$delta + $lthickness + $linespc}]\n \n     if {[info exists idtags($id)]} {\n-\tset marks $idtags($id)\n-\tset ntags [llength $marks]\n+\tset tags $idtags($id)\n+\tset ntags [llength $tags]\n \tif {$ntags > $maxtags ||\n-\t    [totalwidth $marks mainfont $extra] > $maxwidth} {\n+\t    [totalwidth $tags mainfont $extra] > $maxwidth} {\n \t    # show just a single \"n tags...\" tag\n \t    set singletag 1\n \t    if {$ntags == 1} {\n-\t\tset marks [list \"tag...\"]\n+\t\tlappend marks \"tag...\"\n \t    } else {\n-\t\tset marks [list [format \"%d tags...\" $ntags]]\n+\t\tlappend marks [format \"%d tags...\" $ntags]\n+\t\tset ntags 1\n \t    }\n-\t    set ntags 1\n+\t} else {\n+\t    set marks [concat $marks $tags]\n \t}\n     }\n     if {[info exists idheads($id)]} {\n-- \n2.9.3\n\n"},{"id":"308041","messageId":"cover.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":null,"subject":"[PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:44:59Z","receivedAt":"2016-12-19T16:46:23Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"This patch series changes a bunch of details about how remote-tracking\nreferences are rendered in the commit list of gitk:\n\n* Omit the \"remote/\" prefix on normal remote-tracking references. They\n  are already distinguished via their two-tone rendering and (usually)\n  longer names, and this change saves a lot of visual clutter and\n  horizontal space.\n\n* Render remote-tracking references that have more than the usual\n  three slashes like\n\n      origin/foo/bar\n      ^^^^^^^\n\n  rather than\n\n      origin/foo/bar (formerly remotes/origin/foo/bar)\n      ^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^\n\n  , where the indicated part is the prefix that is rendered in a\n  different color. Usually, such a reference represents a remote\n  branch that contains a slash in its name, so the new split more\n  accurately portrays the separation between remote name and remote\n  branch name.\n\n* Introduce a separate constant to specify the background color used\n  for the branch name part of remote-tracking references, to allow it\n  to differ from the color used for local branches (which by default\n  is bright green).\n\n* Change the default background colors for remote-tracking branches to\n  light brown and brown (formerly they were pale orange and bright\n  green).\n\nI understand that the colors of pixels on computer screens is an even\nmore emotional topic that that of bikesheds, so I implemented the last\nchange as a separate commit, the last one in the series. Feel free to\ndrop it if you don't want the default color change.\n\nAlong the way, I did a bunch of refactoring in the area to make these\nchanges easier, and introduced a constant for the background color of\n\"other\" references so that it can also be adjusted by users.\n\n(Unfortunately, these colors can only be adjusted by editing the\nconfiguration file. Someday it would be nice to allow them to be\nconfigured via the preferences dialog.)\n\nIt's been a while since I've written any Tcl code, so I apologize in\nadvance for any howlers :-)\n\nThis branch applies against the `master` branch in\ngit://ozlabs.org/~paulus/gitk.\n\nMichael\n\nMichael Haggerty (13):\n  gitk: when processing tag labels, don't use `marks` as scratch space\n  gitk: keep track of tag types in a separate `types` array\n  gitk: use a type \"tags\" to indicate abbreviated tags\n  gitk: use a type \"mainhead\" to indicate the main HEAD branch\n  gitk: fill in `wvals` as the tags are first processed\n  gitk: simplify regexp\n  gitk: extract a method `remotereftext`\n  gitk: only change the color of the \"remote\" part of remote refs\n  gitk: shorten labels displayed for modern remote-tracking refs\n  gitk: use type \"remote\" for remote-tracking references\n  gitk: introduce a constant otherrefbgcolor\n  gitk: add a configuration setting `remoterefbgcolor`\n  gitk: change the default colors for remote-tracking references\n\n gitk | 114 ++++++++++++++++++++++++++++++++++++++++++++-----------------------\n 1 file changed, 76 insertions(+), 38 deletions(-)\n\n-- \n2.9.3\n\n"},{"id":"308042","messageId":"e9d546743245a59925fa0ab762a8a1e88ccfc360.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 02/13] gitk: keep track of tag types in a separate `types` array","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:01Z","receivedAt":"2016-12-19T16:47:11Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"The resulting code is easier to follow than the old counting-based code,\nplus in a moment we will add some more specific types.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 37 +++++++++++++++++++++----------------\n 1 file changed, 21 insertions(+), 16 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 296efb3..7c830c3 100755\n--- a/gitk\n+++ b/gitk\n@@ -6560,8 +6560,7 @@ proc drawtags {id x xt y1} {\n     global reflinecolor\n \n     set marks {}\n-    set ntags 0\n-    set nheads 0\n+    set types {}\n     set singletag 0\n     set maxtags 3\n     set maxtagpct 25\n@@ -6576,22 +6575,30 @@ proc drawtags {id x xt y1} {\n \t    [totalwidth $tags mainfont $extra] > $maxwidth} {\n \t    # show just a single \"n tags...\" tag\n \t    set singletag 1\n+\t    lappend types tag\n \t    if {$ntags == 1} {\n \t\tlappend marks \"tag...\"\n \t    } else {\n \t\tlappend marks [format \"%d tags...\" $ntags]\n-\t\tset ntags 1\n \t    }\n \t} else {\n-\t    set marks [concat $marks $tags]\n+\t    foreach tag $tags {\n+\t\tlappend types tag\n+\t\tlappend marks $tag\n+\t    }\n \t}\n     }\n     if {[info exists idheads($id)]} {\n-\tset marks [concat $marks $idheads($id)]\n-\tset nheads [llength $idheads($id)]\n+\tforeach head $idheads($id) {\n+\t    lappend types head\n+\t    lappend marks $head\n+\t}\n     }\n     if {[info exists idotherrefs($id)]} {\n-\tset marks [concat $marks $idotherrefs($id)]\n+\tforeach other $idotherrefs($id) {\n+\t    lappend types other\n+\t    lappend marks $other\n+\t}\n     }\n     if {$marks eq {}} {\n \treturn $xt\n@@ -6601,10 +6608,8 @@ proc drawtags {id x xt y1} {\n     set yb [expr {$yt + $linespc - 1}]\n     set xvals {}\n     set wvals {}\n-    set i -1\n-    foreach tag $marks {\n-\tincr i\n-\tif {$i >= $ntags && $i < $ntags + $nheads && $tag eq $mainhead} {\n+    foreach tag $marks type $types {\n+\tif {$type eq \"head\" && $tag eq $mainhead} {\n \t    set wid [font measure mainfontbold $tag]\n \t} else {\n \t    set wid [font measure mainfont $tag]\n@@ -6616,12 +6621,12 @@ proc drawtags {id x xt y1} {\n     set t [$canv create line $x $y1 [lindex $xvals end] $y1 \\\n \t       -width $lthickness -fill $reflinecolor -tags tag.$id]\n     $canv lower $t\n-    foreach tag $marks x $xvals wid $wvals {\n+    foreach tag $marks type $types x $xvals wid $wvals {\n \tset tag_quoted [string map {% %%} $tag]\n \tset xl [expr {$x + $delta}]\n \tset xr [expr {$x + $delta + $wid + $lthickness}]\n \tset font mainfont\n-\tif {[incr ntags -1] >= 0} {\n+\tif {$type eq \"tag\"} {\n \t    # draw a tag\n \t    set t [$canv create polygon $x [expr {$yt + $delta}] $xl $yt \\\n \t\t       $xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta}] \\\n@@ -6636,7 +6641,7 @@ proc drawtags {id x xt y1} {\n \t    set rowtextx([rowofcommit $id]) [expr {$xr + $linespc}]\n \t} else {\n \t    # draw a head or other ref\n-\t    if {[incr nheads -1] >= 0} {\n+\t    if {$type eq \"head\"} {\n \t\tset col $headbgcolor\n \t\tif {$tag eq $mainhead} {\n \t\t    set font mainfontbold\n@@ -6658,9 +6663,9 @@ proc drawtags {id x xt y1} {\n \t}\n \tset t [$canv create text $xl $y1 -anchor w -text $tag -fill $headfgcolor \\\n \t\t   -font $font -tags [list tag.$id text]]\n-\tif {$ntags >= 0} {\n+\tif {$type eq \"tag\"} {\n \t    $canv bind $t <1> $tagclick\n-\t} elseif {$nheads >= 0} {\n+\t} elseif {$type eq \"head\"} {\n \t    $canv bind $t $ctxbut [list headmenu %X %Y $id $tag_quoted]\n \t}\n     }\n-- \n2.9.3\n\n"},{"id":"308043","messageId":"543b8463c22b19aade4c5dbcc72f4fc8663d372a.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 12/13] gitk: add a configuration setting `remoterefbgcolor`","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:11Z","receivedAt":"2016-12-19T16:47:15Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Remote-tracking references are very different than local branches, so it\nwould be nice to make it possible to distinguish then visually. So allow\nthe remote reference background color to be configured separately from\nthe branch reference background color by introducing a new constant,\n`remoterefbgcolor`. For the moment, leave it set to the old default\n`headbgcolor`.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 0bd4aa5..cb5c715 100755\n--- a/gitk\n+++ b/gitk\n@@ -6574,7 +6574,7 @@ proc drawtags {id x xt y1} {\n     global linespc lthickness\n     global canv rowtextx curview fgcolor bgcolor ctxbut\n     global headbgcolor headfgcolor headoutlinecolor\n-    global remotebgcolor otherrefbgcolor\n+    global remotebgcolor remoterefbgcolor otherrefbgcolor\n     global tagbgcolor tagfgcolor tagoutlinecolor\n     global reflinecolor\n \n@@ -6669,8 +6669,10 @@ proc drawtags {id x xt y1} {\n \t    if {$type eq \"mainhead\"} {\n \t\tset col $headbgcolor\n \t\tset font mainfontbold\n-\t    } elseif {$type eq \"head\" || $type eq \"remote\"} {\n+\t    } elseif {$type eq \"head\"} {\n \t\tset col $headbgcolor\n+\t    } elseif {$type eq \"remote\"} {\n+\t\tset col $remoterefbgcolor\n \t    } else {\n \t\tset col $otherrefbgcolor\n \t    }\n@@ -12362,6 +12364,7 @@ set headbgcolor \"#00ff00\"\n set headfgcolor black\n set headoutlinecolor black\n set remotebgcolor #ffddaa\n+set remoterefbgcolor #00ff00\n set otherrefbgcolor #ddddff\n set tagbgcolor yellow\n set tagfgcolor black\n@@ -12420,7 +12423,7 @@ set config_variables {\n     bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors\n     markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor\n     extdifftool perfile_attrs headbgcolor headfgcolor headoutlinecolor\n-    remotebgcolor otherrefbgcolor\n+    remotebgcolor remoterefbgcolor otherrefbgcolor\n     tagbgcolor tagfgcolor tagoutlinecolor reflinecolor\n     filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor\n     linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor\n-- \n2.9.3\n\n"},{"id":"308044","messageId":"ab32f828039654b0e1d474adb606178296ef795c.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 07/13] gitk: extract a method `remotereftext`","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:06Z","receivedAt":"2016-12-19T16:48:03Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"The text value that it also provides to its caller is not used yet, but\nit will be soon.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 18 +++++++++++++++++-\n 1 file changed, 17 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 84a5326..51ebaf5 100755\n--- a/gitk\n+++ b/gitk\n@@ -6551,6 +6551,22 @@ proc totalwidth {l font extra} {\n     return $tot\n }\n \n+# Set textName to the text that should be shown in the label for the\n+# specified head and prefixName to the prefix text that should be\n+# highlighted in $remotebgcolor. Return 1 iff $head is a remote head.\n+proc remotereftext {head textName prefixName} {\n+    upvar $textName text\n+    upvar $prefixName prefix\n+\n+    if {[regexp {^((remotes/(.*/|)).*)} $head match text prefix]} {\n+\treturn 1\n+    } else {\n+\tset text $head\n+\tset prefix \"\"\n+\treturn 0\n+    }\n+}\n+\n proc drawtags {id x xt y1} {\n     global idtags idheads idotherrefs mainhead\n     global linespc lthickness\n@@ -6654,7 +6670,7 @@ proc drawtags {id x xt y1} {\n \t    set xl [expr {$xl - $delta/2}]\n \t    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \\\n \t\t-width 1 -outline black -fill $col -tags tag.$id\n-\t    if {[regexp {^(remotes/(.*/|))} $tag match remoteprefix]} {\n+\t    if {[remotereftext $tag text remoteprefix]} {\n \t        set rwid [font measure mainfont $remoteprefix]\n \t\tset xi [expr {$x + 1}]\n \t\tset yti [expr {$yt + 1}]\n-- \n2.9.3\n\n"},{"id":"308045","messageId":"d81788d824842d72dbca7234ca9c3572c82f3855.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 06/13] gitk: simplify regexp","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:05Z","receivedAt":"2016-12-19T16:48:25Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex fb2f653..84a5326 100755\n--- a/gitk\n+++ b/gitk\n@@ -6654,7 +6654,7 @@ proc drawtags {id x xt y1} {\n \t    set xl [expr {$xl - $delta/2}]\n \t    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \\\n \t\t-width 1 -outline black -fill $col -tags tag.$id\n-\t    if {[regexp {^(remotes/.*/|remotes/)} $tag match remoteprefix]} {\n+\t    if {[regexp {^(remotes/(.*/|))} $tag match remoteprefix]} {\n \t        set rwid [font measure mainfont $remoteprefix]\n \t\tset xi [expr {$x + 1}]\n \t\tset yti [expr {$yt + 1}]\n-- \n2.9.3\n\n"},{"id":"308046","messageId":"e51c497cfbc592bd6f7a7e55d3179b740d5523c7.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 04/13] gitk: use a type \"mainhead\" to indicate the main HEAD branch","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:03Z","receivedAt":"2016-12-19T16:49:24Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 18 +++++++++++-------\n 1 file changed, 11 insertions(+), 7 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 502f0aa..d2e3803 100755\n--- a/gitk\n+++ b/gitk\n@@ -6588,7 +6588,11 @@ proc drawtags {id x xt y1} {\n     }\n     if {[info exists idheads($id)]} {\n \tforeach head $idheads($id) {\n-\t    lappend types head\n+\t    if {$head eq $mainhead} {\n+\t\tlappend types mainhead\n+\t    } else {\n+\t\tlappend types head\n+\t    }\n \t    lappend marks $head\n \t}\n     }\n@@ -6607,7 +6611,7 @@ proc drawtags {id x xt y1} {\n     set xvals {}\n     set wvals {}\n     foreach tag $marks type $types {\n-\tif {$type eq \"head\" && $tag eq $mainhead} {\n+\tif {$type eq \"mainhead\"} {\n \t    set wid [font measure mainfontbold $tag]\n \t} else {\n \t    set wid [font measure mainfont $tag]\n@@ -6639,11 +6643,11 @@ proc drawtags {id x xt y1} {\n \t    set rowtextx([rowofcommit $id]) [expr {$xr + $linespc}]\n \t} else {\n \t    # draw a head or other ref\n-\t    if {$type eq \"head\"} {\n+\t    if {$type eq \"mainhead\"} {\n+\t\tset col $headbgcolor\n+\t\tset font mainfontbold\n+\t    } elseif {$type eq \"head\"} {\n \t\tset col $headbgcolor\n-\t\tif {$tag eq $mainhead} {\n-\t\t    set font mainfontbold\n-\t\t}\n \t    } else {\n \t\tset col \"#ddddff\"\n \t    }\n@@ -6663,7 +6667,7 @@ proc drawtags {id x xt y1} {\n \t\t   -font $font -tags [list tag.$id text]]\n \tif {$type eq \"tag\" || $type eq \"tags\"} {\n \t    $canv bind $t <1> $tagclick\n-\t} elseif {$type eq \"head\"} {\n+\t} elseif {$type eq \"head\" || $type eq \"mainhead\"} {\n \t    $canv bind $t $ctxbut [list headmenu %X %Y $id $tag_quoted]\n \t}\n     }\n-- \n2.9.3\n\n"},{"id":"308047","messageId":"3d99aed51a9a03ad50cfd612f3f67f61a338b316.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 08/13] gitk: only change the color of the \"remote\" part of remote refs","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:07Z","receivedAt":"2016-12-19T16:49:44Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"If a remote-tracking reference has the form\n\n    refs/remotes/origin/foo/bar\n\n, then the part of the reference that tells which remote it comes from\nis `refs/remotes/origin`. So display such a reference as\n\n    remotes/origin/foo/bar\n    ^^^^^^^^^^^^^^^\n\n, where the indicated part is displayed in `$remotebgcolor`. The old\ncode always split the reference name at its last slash, thus rendering\nthe above remote-tracking reference as\n\n    remotes/origin/foo/bar\n    ^^^^^^^^^^^^^^^^^^^\n\n, which makes no sense at all.\n\nNote that this commit doesn't change the rendering of remote-tracking\nreferences with only two slashes (e.g., `refs/remotes/foo`). Such\nreferences were created by `git-svn` when using its old naming scheme.\nThey are still rendered like\n\n    remotes/foo\n    ^^^^^^^^\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 51ebaf5..c146a15 100755\n--- a/gitk\n+++ b/gitk\n@@ -6558,7 +6558,7 @@ proc remotereftext {head textName prefixName} {\n     upvar $textName text\n     upvar $prefixName prefix\n \n-    if {[regexp {^((remotes/(.*/|)).*)} $head match text prefix]} {\n+    if {[regexp {^((remotes/([^/]+/|)).*)} $head match text prefix]} {\n \treturn 1\n     } else {\n \tset text $head\n-- \n2.9.3\n\n"},{"id":"308048","messageId":"d7b6999f7e3ba271c6932925cd26ea2884df3014.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 05/13] gitk: fill in `wvals` as the tags are first processed","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:04Z","receivedAt":"2016-12-19T16:50:18Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"It's no longer, and a little bit more direct, to fill in `wvals` at the\nsame time as we determine the tag's type.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex d2e3803..fb2f653 100755\n--- a/gitk\n+++ b/gitk\n@@ -6561,6 +6561,7 @@ proc drawtags {id x xt y1} {\n \n     set marks {}\n     set types {}\n+    set wvals {}\n     set maxtags 3\n     set maxtagpct 25\n     set maxwidth [expr {[graph_pane_width] * $maxtagpct / 100}]\n@@ -6575,14 +6576,17 @@ proc drawtags {id x xt y1} {\n \t    # show just a single \"n tags...\" tag\n \t    lappend types tags\n \t    if {$ntags == 1} {\n-\t\tlappend marks \"tag...\"\n+\t\tset text \"tag...\"\n \t    } else {\n-\t\tlappend marks [format \"%d tags...\" $ntags]\n+\t\tset text [format \"%d tags...\" $ntags]\n \t    }\n+\t    lappend marks $text\n+\t    lappend wvals [font measure mainfont $text]\n \t} else {\n \t    foreach tag $tags {\n \t\tlappend types tag\n \t\tlappend marks $tag\n+\t\tlappend wvals [font measure mainfont $tag]\n \t    }\n \t}\n     }\n@@ -6590,8 +6594,10 @@ proc drawtags {id x xt y1} {\n \tforeach head $idheads($id) {\n \t    if {$head eq $mainhead} {\n \t\tlappend types mainhead\n+\t\tlappend wvals [font measure mainfontbold $head]\n \t    } else {\n \t\tlappend types head\n+\t\tlappend wvals [font measure mainfont $head]\n \t    }\n \t    lappend marks $head\n \t}\n@@ -6600,6 +6606,7 @@ proc drawtags {id x xt y1} {\n \tforeach other $idotherrefs($id) {\n \t    lappend types other\n \t    lappend marks $other\n+\t    lappend wvals [font measure mainfont $other]\n \t}\n     }\n     if {$marks eq {}} {\n@@ -6609,15 +6616,8 @@ proc drawtags {id x xt y1} {\n     set yt [expr {$y1 - 0.5 * $linespc}]\n     set yb [expr {$yt + $linespc - 1}]\n     set xvals {}\n-    set wvals {}\n-    foreach tag $marks type $types {\n-\tif {$type eq \"mainhead\"} {\n-\t    set wid [font measure mainfontbold $tag]\n-\t} else {\n-\t    set wid [font measure mainfont $tag]\n-\t}\n+    foreach wid $wvals {\n \tlappend xvals $xt\n-\tlappend wvals $wid\n \tset xt [expr {$xt + $wid + $extra}]\n     }\n     set t [$canv create line $x $y1 [lindex $xvals end] $y1 \\\n-- \n2.9.3\n\n"},{"id":"308049","messageId":"5dec4a22621a441099b187f081831bbe8f5cc05c.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 09/13] gitk: shorten labels displayed for modern remote-tracking refs","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:08Z","receivedAt":"2016-12-19T16:50:37Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"If a reference has the form\n\n    refs/remotes/origin/foo\n\n, then use the label\n\n    origin/foo\n    ^^^^^^^\n\n, where the indicated part is displayed in `$remotebgcolor`. The old\ncode would have displayed such a reference as\n\n    remotes/origin/foo\n    ^^^^^^^^^^^^^^^\n\n, which wastes horizontal space displaying `remote/` for every remote\nreference. However, if a remote-tracking reference has only two slashes,\nlike\n\n    refs/remotes/baz\n\n, render the label the same as before, namely\n\n    remotes/baz\n    ^^^^^^^^\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex c146a15..d22ce5f 100755\n--- a/gitk\n+++ b/gitk\n@@ -6558,7 +6558,9 @@ proc remotereftext {head textName prefixName} {\n     upvar $textName text\n     upvar $prefixName prefix\n \n-    if {[regexp {^((remotes/([^/]+/|)).*)} $head match text prefix]} {\n+    if {[regexp {^remotes/(([^/]+/).*)} $head match text prefix]} {\n+\treturn 1\n+    } elseif {[regexp {^((remotes/).*)} $head match text prefix]} {\n \treturn 1\n     } else {\n \tset text $head\n@@ -6613,7 +6615,8 @@ proc drawtags {id x xt y1} {\n \t\tlappend wvals [font measure mainfontbold $head]\n \t    } else {\n \t\tlappend types head\n-\t\tlappend wvals [font measure mainfont $head]\n+\t\tremotereftext $head text remoteprefix\n+\t\tlappend wvals [font measure mainfont $text]\n \t    }\n \t    lappend marks $head\n \t}\n@@ -6644,6 +6647,7 @@ proc drawtags {id x xt y1} {\n \tset xl [expr {$x + $delta}]\n \tset xr [expr {$x + $delta + $wid + $lthickness}]\n \tset font mainfont\n+\tset text $tag\n \tif {$type eq \"tag\" || $type eq \"tags\"} {\n \t    # draw a tag\n \t    set t [$canv create polygon $x [expr {$yt + $delta}] $xl $yt \\\n@@ -6679,7 +6683,7 @@ proc drawtags {id x xt y1} {\n \t\t\t-width 0 -fill $remotebgcolor -tags tag.$id\n \t    }\n \t}\n-\tset t [$canv create text $xl $y1 -anchor w -text $tag -fill $headfgcolor \\\n+\tset t [$canv create text $xl $y1 -anchor w -text $text -fill $headfgcolor \\\n \t\t   -font $font -tags [list tag.$id text]]\n \tif {$type eq \"tag\" || $type eq \"tags\"} {\n \t    $canv bind $t <1> $tagclick\n-- \n2.9.3\n\n"},{"id":"308050","messageId":"07f3367fc10b58fe7c36580e4e784139a76198c4.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 10/13] gitk: use type \"remote\" for remote-tracking references","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:09Z","receivedAt":"2016-12-19T16:51:38Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"This is clearer, and also lets us avoid calling `remotereftext` a second\ntime for normal branches.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex d22ce5f..44f4d70 100755\n--- a/gitk\n+++ b/gitk\n@@ -6613,9 +6613,11 @@ proc drawtags {id x xt y1} {\n \t    if {$head eq $mainhead} {\n \t\tlappend types mainhead\n \t\tlappend wvals [font measure mainfontbold $head]\n+\t    } elseif {[remotereftext $head text remoteprefix]} {\n+\t\tlappend types remote\n+\t\tlappend wvals [font measure mainfont $text]\n \t    } else {\n \t\tlappend types head\n-\t\tremotereftext $head text remoteprefix\n \t\tlappend wvals [font measure mainfont $text]\n \t    }\n \t    lappend marks $head\n@@ -6666,7 +6668,7 @@ proc drawtags {id x xt y1} {\n \t    if {$type eq \"mainhead\"} {\n \t\tset col $headbgcolor\n \t\tset font mainfontbold\n-\t    } elseif {$type eq \"head\"} {\n+\t    } elseif {$type eq \"head\" || $type eq \"remote\"} {\n \t\tset col $headbgcolor\n \t    } else {\n \t\tset col \"#ddddff\"\n@@ -6674,7 +6676,8 @@ proc drawtags {id x xt y1} {\n \t    set xl [expr {$xl - $delta/2}]\n \t    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \\\n \t\t-width 1 -outline black -fill $col -tags tag.$id\n-\t    if {[remotereftext $tag text remoteprefix]} {\n+\t    if {$type eq \"remote\"} {\n+\t\tremotereftext $tag text remoteprefix\n \t        set rwid [font measure mainfont $remoteprefix]\n \t\tset xi [expr {$x + 1}]\n \t\tset yti [expr {$yt + 1}]\n-- \n2.9.3\n\n"},{"id":"308051","messageId":"b1587aa5b9b7b3ab4197309706035a8837340778.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 11/13] gitk: introduce a constant otherrefbgcolor","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:10Z","receivedAt":"2016-12-19T16:52:24Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"This is the value used for references other than tags, heads, and\nremote-tracking references (e.g., `refs/stash`).\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 44f4d70..0bd4aa5 100755\n--- a/gitk\n+++ b/gitk\n@@ -6573,7 +6573,8 @@ proc drawtags {id x xt y1} {\n     global idtags idheads idotherrefs mainhead\n     global linespc lthickness\n     global canv rowtextx curview fgcolor bgcolor ctxbut\n-    global headbgcolor headfgcolor headoutlinecolor remotebgcolor\n+    global headbgcolor headfgcolor headoutlinecolor\n+    global remotebgcolor otherrefbgcolor\n     global tagbgcolor tagfgcolor tagoutlinecolor\n     global reflinecolor\n \n@@ -6671,7 +6672,7 @@ proc drawtags {id x xt y1} {\n \t    } elseif {$type eq \"head\" || $type eq \"remote\"} {\n \t\tset col $headbgcolor\n \t    } else {\n-\t\tset col \"#ddddff\"\n+\t\tset col $otherrefbgcolor\n \t    }\n \t    set xl [expr {$xl - $delta/2}]\n \t    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \\\n@@ -12361,6 +12362,7 @@ set headbgcolor \"#00ff00\"\n set headfgcolor black\n set headoutlinecolor black\n set remotebgcolor #ffddaa\n+set otherrefbgcolor #ddddff\n set tagbgcolor yellow\n set tagfgcolor black\n set tagoutlinecolor black\n@@ -12418,7 +12420,8 @@ set config_variables {\n     bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors\n     markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor\n     extdifftool perfile_attrs headbgcolor headfgcolor headoutlinecolor\n-    remotebgcolor tagbgcolor tagfgcolor tagoutlinecolor reflinecolor\n+    remotebgcolor otherrefbgcolor\n+    tagbgcolor tagfgcolor tagoutlinecolor reflinecolor\n     filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor\n     linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor\n     indexcirclecolor circlecolors linkfgcolor circleoutlinecolor\n-- \n2.9.3\n\n"},{"id":"308052","messageId":"1d704ec5620f97bc6129d738666e7acabff4e97a.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 13/13] gitk: change the default colors for remote-tracking references","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:12Z","receivedAt":"2016-12-19T16:52:52Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Instead of coloring the reference name part of remote-tracking\nreferences the same bright green as used for local branches, change it\nto a subtler brown. Change the remote name color to go better with the\nbrown.\n\nI chose these colors because\n\n* Remote-tracking references are less important than local branches, so\n  it is appropriate that their coloring be subtler.\n\n* Brown isn't used elsewhere.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex cb5c715..be97640 100755\n--- a/gitk\n+++ b/gitk\n@@ -12363,8 +12363,8 @@ set markbgcolor \"#e0e0ff\"\n set headbgcolor \"#00ff00\"\n set headfgcolor black\n set headoutlinecolor black\n-set remotebgcolor #ffddaa\n-set remoterefbgcolor #00ff00\n+set remotebgcolor #d9d4b2\n+set remoterefbgcolor #c1a677\n set otherrefbgcolor #ddddff\n set tagbgcolor yellow\n set tagfgcolor black\n-- \n2.9.3\n\n"},{"id":"308053","messageId":"3430c26d58763ec7c91af1f942af34bab14efef7.1482164633.git.mhagger@alum.mit.edu","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"[PATCH 03/13] gitk: use a type \"tags\" to indicate abbreviated tags","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-19T16:45:02Z","receivedAt":"2016-12-19T16:53:22Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"This replaces the functionality of the old `singletag` variable.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n gitk | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 7c830c3..502f0aa 100755\n--- a/gitk\n+++ b/gitk\n@@ -6561,7 +6561,6 @@ proc drawtags {id x xt y1} {\n \n     set marks {}\n     set types {}\n-    set singletag 0\n     set maxtags 3\n     set maxtagpct 25\n     set maxwidth [expr {[graph_pane_width] * $maxtagpct / 100}]\n@@ -6574,8 +6573,7 @@ proc drawtags {id x xt y1} {\n \tif {$ntags > $maxtags ||\n \t    [totalwidth $tags mainfont $extra] > $maxwidth} {\n \t    # show just a single \"n tags...\" tag\n-\t    set singletag 1\n-\t    lappend types tag\n+\t    lappend types tags\n \t    if {$ntags == 1} {\n \t\tlappend marks \"tag...\"\n \t    } else {\n@@ -6626,13 +6624,13 @@ proc drawtags {id x xt y1} {\n \tset xl [expr {$x + $delta}]\n \tset xr [expr {$x + $delta + $wid + $lthickness}]\n \tset font mainfont\n-\tif {$type eq \"tag\"} {\n+\tif {$type eq \"tag\" || $type eq \"tags\"} {\n \t    # draw a tag\n \t    set t [$canv create polygon $x [expr {$yt + $delta}] $xl $yt \\\n \t\t       $xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta}] \\\n \t\t       -width 1 -outline $tagoutlinecolor -fill $tagbgcolor \\\n \t\t       -tags tag.$id]\n-\t    if {$singletag} {\n+\t    if {$type eq \"tags\"} {\n \t\tset tagclick [list showtags $id 1]\n \t    } else {\n \t\tset tagclick [list showtag $tag_quoted 1]\n@@ -6663,7 +6661,7 @@ proc drawtags {id x xt y1} {\n \t}\n \tset t [$canv create text $xl $y1 -anchor w -text $tag -fill $headfgcolor \\\n \t\t   -font $font -tags [list tag.$id text]]\n-\tif {$type eq \"tag\"} {\n+\tif {$type eq \"tag\" || $type eq \"tags\"} {\n \t    $canv bind $t <1> $tagclick\n \t} elseif {$type eq \"head\"} {\n \t    $canv bind $t $ctxbut [list headmenu %X %Y $id $tag_quoted]\n-- \n2.9.3\n\n"},{"id":"308107","messageId":"CB83F601FBED482582F20099849D661A@PhilipOakley","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2016-12-19T22:54:46Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Michael Haggerty\" <mhagger@alum.mit.edu>\n> This patch series changes a bunch of details about how remote-tracking\n> references are rendered in the commit list of gitk:\n>\n[...]\n> * Introduce a separate constant to specify the background color used\n>  for the branch name part of remote-tracking references, to allow it\n>  to differ from the color used for local branches (which by default\n>  is bright green).\n>\n> * Change the default background colors for remote-tracking branches to\n>  light brown and brown (formerly they were pale orange and bright\n>  green).\n>\n> I understand that the colors of pixels on computer screens is an even\n> more emotional topic that that of bikesheds, so I implemented the last\n> change as a separate commit, the last one in the series. Feel free to\n> drop it if you don't want the default color change.\n>\n\n\nJust to say that there was an issue with the bright green (lime) a while\nback when 'green' changed its colour.\n\ndscho reported in\n(https://github.com/git-for-windows/git/issues/300#issuecomment-133702654\n26 Aug 2015)\n\n\"[T]his is a change in Tk 8.6 described here (http://wiki.tcl.tk/1424): From\nTcl/Tk 8.6 on, Tk uses Web colours instead of X11 ones, where they\nconflict.\"\n\nIn particular the old bright green version of 'green' became a darker green,\nwith the old colour becoming named lime.\n\nFor me, I needed to change my colour scheme (to a lime) as I could not read\nthe refs against the darker colour.\n\nAnyway, that's the background as I know it.\n\n--\nPhilip\n\n\n"},{"id":"308131","messageId":"48f37df9-7264-f6d9-0d74-93e7949568e3@alum.mit.edu","threadId":"44735","inReplyTo":"CB83F601FBED482582F20099849D661A@PhilipOakley","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-20T08:03:52Z","receivedAt":"2016-12-20T08:04:59Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"On 12/19/2016 11:53 PM, Philip Oakley wrote:\n> From: \"Michael Haggerty\" <mhagger@alum.mit.edu>\n>> This patch series changes a bunch of details about how remote-tracking\n>> references are rendered in the commit list of gitk:\n>>\n> [...]\n>> * Introduce a separate constant to specify the background color used\n>>  for the branch name part of remote-tracking references, to allow it\n>>  to differ from the color used for local branches (which by default\n>>  is bright green).\n>>\n>> * Change the default background colors for remote-tracking branches to\n>>  light brown and brown (formerly they were pale orange and bright\n>>  green).\n>>\n>> I understand that the colors of pixels on computer screens is an even\n>> more emotional topic that that of bikesheds, so I implemented the last\n>> change as a separate commit, the last one in the series. Feel free to\n>> drop it if you don't want the default color change.\n> \n> Just to say that there was an issue with the bright green (lime) a while\n> back when 'green' changed its colour.\n> \n> dscho reported in\n> (https://github.com/git-for-windows/git/issues/300#issuecomment-133702654\n> 26 Aug 2015)\n> \n> \"[T]his is a change in Tk 8.6 described here (http://wiki.tcl.tk/1424):\n> From\n> Tcl/Tk 8.6 on, Tk uses Web colours instead of X11 ones, where they\n> conflict.\"\n> \n> In particular the old bright green version of 'green' became a darker\n> green,\n> with the old colour becoming named lime.\n> \n> For me, I needed to change my colour scheme (to a lime) as I could not read\n> the refs against the darker colour.\n> \n> Anyway, that's the background as I know it.\n\nThanks for the context. In fact, it was this color change that got me\nlooking at this code in the first place.\n\nFor anyone still suffering from the \"green background of branch labels\nin gitk got too dark\" problem:\n\nThe default color in gitk was made lighter again in\n\n    66db14c \"gitk: Color name update\", 2015-10-25\n\nBut your own configuration might still have \"green\" written in it, from\nthe days when \"green\" was still bright. If so, change the value for\n`headbgcolor` to `lime` in `~/.config/git/gitk`.\n\nIt would be nice if these colors were adjustable via the \"Preferences ->\nColors\" dialog.\n\nMichael\n\n"},{"id":"308144","messageId":"97d97bc6-54f1-2ef2-fe04-7e7f144d7e51@xiplink.com","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2016-12-20T15:01:15Z","receivedAt":"2016-12-20T15:06:47Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2016-12-19 11:44 AM, Michael Haggerty wrote:\n> This patch series changes a bunch of details about how remote-tracking\n> references are rendered in the commit list of gitk:\n\nThanks for this!  I like the new, compact look very much!\n\nThat said, I remember when I was a new git user and I leaned heavily on \ngitk to understand how references worked.  It was particularly \nilluminating to see the remote references distinctly labeled, and the \nfact that they were \"remotes/origin/foo\" gave me an Aha! moment where I \ncame to understand that the refs hierarchy is more flexible than just \nthe conventions coded into git itself.  I eventually felt free to create \nmy own, private ref hierarchies.\n\nI am in no way opposed to this series.  I just wanted to point out that \nthere was some utility in those labels.  It makes me think that it might \nbe worthwhile for gitk to have a \"raw-refs\" mode, that shows the full \n\"refs/foo/bar/baz\" paths of all the heads, tags, and whatever else.  It \ncould be a useful teaching tool for git.\n\n> * Omit the \"remote/\" prefix on normal remote-tracking references. They\n\nIf you re-roll, s:remote/:remotes/:.\n\n>   are already distinguished via their two-tone rendering and (usually)\n>   longer names, and this change saves a lot of visual clutter and\n>   horizontal space.\n>\n> * Render remote-tracking references that have more than the usual\n>   three slashes like\n>\n>       origin/foo/bar\n>       ^^^^^^^\n>\n>   rather than\n>\n>       origin/foo/bar (formerly remotes/origin/foo/bar)\n>       ^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^\n>\n>   , where the indicated part is the prefix that is rendered in a\n>   different color. Usually, such a reference represents a remote\n>   branch that contains a slash in its name, so the new split more\n>   accurately portrays the separation between remote name and remote\n>   branch name.\n\n*Love* this change!  :)\n\n> * Introduce a separate constant to specify the background color used\n>   for the branch name part of remote-tracking references, to allow it\n>   to differ from the color used for local branches (which by default\n>   is bright green).\n>\n> * Change the default background colors for remote-tracking branches to\n>   light brown and brown (formerly they were pale orange and bright\n>   green).\n\nPlease don't change the remotebgcolor default.\n\nAlso, perhaps the default remoterefbgcolor should be\n\tset remoterefbgcolor $headbgcolor\n?\n\nI say this because when I applied the series, without the last patch, I \nwas miffed that the remote/ref colour had changed.\n\nPlus I think there's utility in having local and remote branch names in \nthe same colour, again especially for new users.  It helps emphasize \ntheir similarities, and demystify some of git's internal magic.\n\n\t\tM.\n\n\n> I understand that the colors of pixels on computer screens is an even\n> more emotional topic that that of bikesheds, so I implemented the last\n> change as a separate commit, the last one in the series. Feel free to\n> drop it if you don't want the default color change.\n>\n> Along the way, I did a bunch of refactoring in the area to make these\n> changes easier, and introduced a constant for the background color of\n> \"other\" references so that it can also be adjusted by users.\n>\n> (Unfortunately, these colors can only be adjusted by editing the\n> configuration file. Someday it would be nice to allow them to be\n> configured via the preferences dialog.)\n>\n> It's been a while since I've written any Tcl code, so I apologize in\n> advance for any howlers :-)\n>\n> This branch applies against the `master` branch in\n> git://ozlabs.org/~paulus/gitk.\n>\n> Michael\n>\n> Michael Haggerty (13):\n>   gitk: when processing tag labels, don't use `marks` as scratch space\n>   gitk: keep track of tag types in a separate `types` array\n>   gitk: use a type \"tags\" to indicate abbreviated tags\n>   gitk: use a type \"mainhead\" to indicate the main HEAD branch\n>   gitk: fill in `wvals` as the tags are first processed\n>   gitk: simplify regexp\n>   gitk: extract a method `remotereftext`\n>   gitk: only change the color of the \"remote\" part of remote refs\n>   gitk: shorten labels displayed for modern remote-tracking refs\n>   gitk: use type \"remote\" for remote-tracking references\n>   gitk: introduce a constant otherrefbgcolor\n>   gitk: add a configuration setting `remoterefbgcolor`\n>   gitk: change the default colors for remote-tracking references\n>\n>  gitk | 114 ++++++++++++++++++++++++++++++++++++++++++++-----------------------\n>  1 file changed, 76 insertions(+), 38 deletions(-)\n>\n"},{"id":"308176","messageId":"20161220221719.GB22566@fergus.ozlabs.ibm.com","threadId":"44735","inReplyTo":"97d97bc6-54f1-2ef2-fe04-7e7f144d7e51@xiplink.com","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Paul Mackerras","fromEmail":"paulus@ozlabs.org","sentAt":"2016-12-20T22:17:19Z","receivedAt":"2016-12-20T22:17:29Z","isPatch":true,"sender":{"key":"paulus@ozlabs.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Tue, Dec 20, 2016 at 10:01:15AM -0500, Marc Branchaud wrote:\n> On 2016-12-19 11:44 AM, Michael Haggerty wrote:\n> >This patch series changes a bunch of details about how remote-tracking\n> >references are rendered in the commit list of gitk:\n> \n> Thanks for this!  I like the new, compact look very much!\n> \n> That said, I remember when I was a new git user and I leaned heavily on gitk\n> to understand how references worked.  It was particularly illuminating to\n> see the remote references distinctly labeled, and the fact that they were\n> \"remotes/origin/foo\" gave me an Aha! moment where I came to understand that\n> the refs hierarchy is more flexible than just the conventions coded into git\n> itself.  I eventually felt free to create my own, private ref hierarchies.\n> \n> I am in no way opposed to this series.  I just wanted to point out that\n> there was some utility in those labels.  It makes me think that it might be\n> worthwhile for gitk to have a \"raw-refs\" mode, that shows the full\n> \"refs/foo/bar/baz\" paths of all the heads, tags, and whatever else.  It\n> could be a useful teaching tool for git.\n\nDo you think we should have a checkbox in the preferences dialog to\nselect whether to display the long form or the short form?\n\nPaul.\n"},{"id":"308177","messageId":"b19e76cb-8584-186b-512b-e53ef263f7a7@xiplink.com","threadId":"44735","inReplyTo":"20161220221719.GB22566@fergus.ozlabs.ibm.com","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2016-12-20T22:53:05Z","receivedAt":"2016-12-20T23:01:45Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2016-12-20 05:17 PM, Paul Mackerras wrote:\n> On Tue, Dec 20, 2016 at 10:01:15AM -0500, Marc Branchaud wrote:\n>> On 2016-12-19 11:44 AM, Michael Haggerty wrote:\n>>> This patch series changes a bunch of details about how remote-tracking\n>>> references are rendered in the commit list of gitk:\n>>\n>> Thanks for this!  I like the new, compact look very much!\n>>\n>> That said, I remember when I was a new git user and I leaned heavily on gitk\n>> to understand how references worked.  It was particularly illuminating to\n>> see the remote references distinctly labeled, and the fact that they were\n>> \"remotes/origin/foo\" gave me an Aha! moment where I came to understand that\n>> the refs hierarchy is more flexible than just the conventions coded into git\n>> itself.  I eventually felt free to create my own, private ref hierarchies.\n>>\n>> I am in no way opposed to this series.  I just wanted to point out that\n>> there was some utility in those labels.  It makes me think that it might be\n>> worthwhile for gitk to have a \"raw-refs\" mode, that shows the full\n>> \"refs/foo/bar/baz\" paths of all the heads, tags, and whatever else.  It\n>> could be a useful teaching tool for git.\n>\n> Do you think we should have a checkbox in the preferences dialog to\n> select whether to display the long form or the short form?\n\nMmmm, more knobs!\n\nNo, I don't think that's necessary.  Such a setting would probably just \nconfuse people.  Plus it's not something anyone is likely to want to \nchange anyway.  Maybe if there were an \"Advanced\" tab in the settings \ndialog, but even then it seems like overkill.\n\nI suspect there are better ways to teach people about the refs hierarchy \nthan cluttering up gitk.  These may even already exist -- I've been a \ngit user for 8 years now, so I'm sure my perspective of the learning \ncurve is skewed.\n\n\t\tM.\n\n"},{"id":"308189","messageId":"046b088c-afd5-66b9-fe3c-255e42a7d768@alum.mit.edu","threadId":"44735","inReplyTo":"97d97bc6-54f1-2ef2-fe04-7e7f144d7e51@xiplink.com","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-21T00:05:54Z","receivedAt":"2016-12-21T00:06:03Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"On 12/20/2016 04:01 PM, Marc Branchaud wrote:\n> On 2016-12-19 11:44 AM, Michael Haggerty wrote:\n>> This patch series changes a bunch of details about how remote-tracking\n>> references are rendered in the commit list of gitk:\n> \n> Thanks for this!  I like the new, compact look very much!\n> \n> That said, I remember when I was a new git user and I leaned heavily on\n> gitk to understand how references worked.  It was particularly\n> illuminating to see the remote references distinctly labeled, and the\n> fact that they were \"remotes/origin/foo\" gave me an Aha! moment where I\n> came to understand that the refs hierarchy is more flexible than just\n> the conventions coded into git itself.  I eventually felt free to create\n> my own, private ref hierarchies.\n> \n> I am in no way opposed to this series.  I just wanted to point out that\n> there was some utility in those labels.  It makes me think that it might\n> be worthwhile for gitk to have a \"raw-refs\" mode, that shows the full\n> \"refs/foo/bar/baz\" paths of all the heads, tags, and whatever else.  It\n> could be a useful teaching tool for git.\n\nYes, I understand that the longer names might be useful for beginners,\nand the full names even more so. However, I think once a user has that\n\"aha!\" moment, the space wasted on all the redundant words is a real\nimpediment to gitk's usability. It is common to have a few references on\na single commit (especially if you pull from multiple remotes), in which\ncase the summary line is completely invisible (and therefore its context\nmenu is unreachable). I don't like the idea of dumbing down the UI\npermanently based on what users need at the very beginning of their Git\nusage.\n\nWould it be possible to use the short names in the UI but to add the\nfull names to a tooltip or to the context menu?\n\n>> * Omit the \"remote/\" prefix on normal remote-tracking references. They\n> \n> If you re-roll, s:remote/:remotes/:.\n\nThanks.\n\n>>   are already distinguished via their two-tone rendering and (usually)\n>>   longer names, and this change saves a lot of visual clutter and\n>>   horizontal space.\n>>\n>> * Render remote-tracking references that have more than the usual\n>>   three slashes like\n>>\n>>       origin/foo/bar\n>>       ^^^^^^^\n>>\n>>   rather than\n>>\n>>       origin/foo/bar (formerly remotes/origin/foo/bar)\n>>       ^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^\n>>\n>>   , where the indicated part is the prefix that is rendered in a\n>>   different color. Usually, such a reference represents a remote\n>>   branch that contains a slash in its name, so the new split more\n>>   accurately portrays the separation between remote name and remote\n>>   branch name.\n> \n> *Love* this change!  :)\n> \n>> * Introduce a separate constant to specify the background color used\n>>   for the branch name part of remote-tracking references, to allow it\n>>   to differ from the color used for local branches (which by default\n>>   is bright green).\n>>\n>> * Change the default background colors for remote-tracking branches to\n>>   light brown and brown (formerly they were pale orange and bright\n>>   green).\n> \n> Please don't change the remotebgcolor default.\n> \n> Also, perhaps the default remoterefbgcolor should be\n>     set remoterefbgcolor $headbgcolor\n> ?\n> \n> I say this because when I applied the series, without the last patch, I\n> was miffed that the remote/ref colour had changed.\n\nThis is a one-time inconvenience that gitk developers will experience. I\ndoubt that users jump backwards and forwards in gitk versions very often.\n\nI do find it strange that gitk writes a color selection to its\nconfiguration file *even if the user has left it at its default*.\nNormally I would expect only user-changed settings to be written to the\nconfig file, and other values to use the default that is built into the\nprogram. For example, such an approach would have made the transition\nfrom \"green\" to \"lime\" easier.\n\n> [...]\n\nThanks for your feedback!\nMichael\n\n"},{"id":"308211","messageId":"bfbd5992-da30-b1f0-59e5-a2f36d2e3062@xiplink.com","threadId":"44735","inReplyTo":"046b088c-afd5-66b9-fe3c-255e42a7d768@alum.mit.edu","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2016-12-21T19:07:19Z","receivedAt":"2016-12-21T19:07:24Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2016-12-20 07:05 PM, Michael Haggerty wrote:\n> On 12/20/2016 04:01 PM, Marc Branchaud wrote:\n>> On 2016-12-19 11:44 AM, Michael Haggerty wrote:\n>>> This patch series changes a bunch of details about how remote-tracking\n>>> references are rendered in the commit list of gitk:\n>>\n>> Thanks for this!  I like the new, compact look very much!\n>>\n>> That said, I remember when I was a new git user and I leaned heavily on\n>> gitk to understand how references worked.  It was particularly\n>> illuminating to see the remote references distinctly labeled, and the\n>> fact that they were \"remotes/origin/foo\" gave me an Aha! moment where I\n>> came to understand that the refs hierarchy is more flexible than just\n>> the conventions coded into git itself.  I eventually felt free to create\n>> my own, private ref hierarchies.\n>>\n>> I am in no way opposed to this series.  I just wanted to point out that\n>> there was some utility in those labels.  It makes me think that it might\n>> be worthwhile for gitk to have a \"raw-refs\" mode, that shows the full\n>> \"refs/foo/bar/baz\" paths of all the heads, tags, and whatever else.  It\n>> could be a useful teaching tool for git.\n>\n> Yes, I understand that the longer names might be useful for beginners,\n> and the full names even more so. However, I think once a user has that\n> \"aha!\" moment, the space wasted on all the redundant words is a real\n> impediment to gitk's usability. It is common to have a few references on\n> a single commit (especially if you pull from multiple remotes), in which\n> case the summary line is completely invisible (and therefore its context\n> menu is unreachable). I don't like the idea of dumbing down the UI\n> permanently based on what users need at the very beginning of their Git\n> usage.\n\nI agree.\n\n> Would it be possible to use the short names in the UI but to add the\n> full names to a tooltip or to the context menu?\n\nI don't know -- my Tk-fu is weak.\n\n>>> * Omit the \"remote/\" prefix on normal remote-tracking references. They\n>>\n>> If you re-roll, s:remote/:remotes/:.\n>\n> Thanks.\n>\n>>>   are already distinguished via their two-tone rendering and (usually)\n>>>   longer names, and this change saves a lot of visual clutter and\n>>>   horizontal space.\n>>>\n>>> * Render remote-tracking references that have more than the usual\n>>>   three slashes like\n>>>\n>>>       origin/foo/bar\n>>>       ^^^^^^^\n>>>\n>>>   rather than\n>>>\n>>>       origin/foo/bar (formerly remotes/origin/foo/bar)\n>>>       ^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^\n>>>\n>>>   , where the indicated part is the prefix that is rendered in a\n>>>   different color. Usually, such a reference represents a remote\n>>>   branch that contains a slash in its name, so the new split more\n>>>   accurately portrays the separation between remote name and remote\n>>>   branch name.\n>>\n>> *Love* this change!  :)\n>>\n>>> * Introduce a separate constant to specify the background color used\n>>>   for the branch name part of remote-tracking references, to allow it\n>>>   to differ from the color used for local branches (which by default\n>>>   is bright green).\n>>>\n>>> * Change the default background colors for remote-tracking branches to\n>>>   light brown and brown (formerly they were pale orange and bright\n>>>   green).\n>>\n>> Please don't change the remotebgcolor default.\n>>\n>> Also, perhaps the default remoterefbgcolor should be\n>>     set remoterefbgcolor $headbgcolor\n>> ?\n>>\n>> I say this because when I applied the series, without the last patch, I\n>> was miffed that the remote/ref colour had changed.\n>\n> This is a one-time inconvenience that gitk developers will experience. I\n> doubt that users jump backwards and forwards in gitk versions very often.\n\nIn what way do you mean it's restricted to gitk developers?\n\nPatch 12 introduces remoterefbgcolor, with a specific default value. \nPrior to that, the \"ref part\" of remote refs was rendered with \nheadbgcolor.  Users who changed their headbgcolor are used to seeing the \n\"ref part\" of remote refs in the same color as their local heads. \nApplying patch 12 changes the \"ref part\" color of remote refs, for such \nusers.\n\nAll I'm saying is that make the remoterefbgcolor default be $headbgcolor \navoids this.\n\nBut, honestly, I don't feel strongly about it.\n\n\t\tM.\n\n"},{"id":"308241","messageId":"24a89c72-af53-0c87-d148-708e014ebe75@alum.mit.edu","threadId":"44735","inReplyTo":"bfbd5992-da30-b1f0-59e5-a2f36d2e3062@xiplink.com","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2016-12-22T08:15:09Z","receivedAt":"2016-12-22T08:15:24Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"On 12/21/2016 08:07 PM, Marc Branchaud wrote:\n> On 2016-12-20 07:05 PM, Michael Haggerty wrote:\n>> On 12/20/2016 04:01 PM, Marc Branchaud wrote:\n>>> [...]\n>>> Please don't change the remotebgcolor default.\n>>>\n>>> Also, perhaps the default remoterefbgcolor should be\n>>>     set remoterefbgcolor $headbgcolor\n>>> ?\n>>>\n>>> I say this because when I applied the series, without the last patch, I\n>>> was miffed that the remote/ref colour had changed.\n>>\n>> This is a one-time inconvenience that gitk developers will experience. I\n>> doubt that users jump backwards and forwards in gitk versions very often.\n> \n> In what way do you mean it's restricted to gitk developers?\n\nMaybe I misunderstood your objection.\n\nWhile developing this, I realized that the very first time your run gitk\n(i.e., when you don't already have a configuration file), it writes the\nthen-current default colors into your configuration file. If you later\nswitch gitk versions to a version with different default colors, the\ncolors from the first-run version are preserved (unless the names of the\nvariables used to hold the colors are changed).\n\nSo if you would run the tip version of my branch first, then the parent\nof that version, you would continue to see the colors as modified by the\nfinal commit. If you then switch to the master version, the remote\nbranch names go back to green (because it goes back to using\n`headbgcolor` again), but the remote prefix stays light brown. I thought\nyou were unhappy about some form of this unexpected persistence problem.\nBut this problem will mostly be experienced by gitk developers who jump\nback and forth between versions.\n\nA normal user probably mostly moves forward through version numbers, and\nonly occasionally. Such a user, jumping from master to the tip of my\nbranch (assuming they haven't customized anything), would see\n\n* local branches stay lime\n* remote branch prefixes stay pale orange (they don't change to light\nbrown because the pale orange color from master is stored in their\nconfiguration file)\n* remote branch names change from lime to brown (because the\n`remoterefbgcolor` configuration setting didn't exist before)\n\n> Patch 12 introduces remoterefbgcolor, with a specific default value.\n> Prior to that, the \"ref part\" of remote refs was rendered with\n> headbgcolor.  Users who changed their headbgcolor are used to seeing the\n> \"ref part\" of remote refs in the same color as their local heads.\n> Applying patch 12 changes the \"ref part\" color of remote refs, for such\n> users.\n> \n> All I'm saying is that make the remoterefbgcolor default be $headbgcolor\n> avoids this.\n\nFor somebody who thinks that most people will want local and\nremote-tracking branch names to be rendered in the same color, your\nsuggestion would be an improvement.\n\nBut for somebody like me who thinks it is a good idea to render\nremote-tracking branch names in a different color than local branch\nnames, this is a feature, not a bug. Even a user who explicitly\nconfigured `headbgcolor` to, say, purple, wasn't necessarily expressing\na wish to have remote-tracking branch names rendered in purple. Until\nnow they had no choice to set these colors separately!\n\nSo even for somebody who configured this setting before, I think that\nhaving the remote-tracking branch names change color when the user\nupgrades to this version is a good thing, because it lets the user know\nthat these two things can now be colored independently. If they don't\nlike the new default brown color, such a user knows where to change it\n(even to make it agree with `headbgcolor` if they want that).\n\nBut I understand that this is a matter of personal preference. I have\nbut one \"vote\" :-)\n\nMichael\n\n"},{"id":"309071","messageId":"a2b38629-be34-c745-6e45-3a36123c4ef7@xiplink.com","threadId":"44735","inReplyTo":"24a89c72-af53-0c87-d148-708e014ebe75@alum.mit.edu","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2017-01-09T22:03:20Z","receivedAt":"2017-01-09T22:03:27Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2016-12-22 03:15 AM, Michael Haggerty wrote:\n> On 12/21/2016 08:07 PM, Marc Branchaud wrote:\n>> On 2016-12-20 07:05 PM, Michael Haggerty wrote:\n>>> On 12/20/2016 04:01 PM, Marc Branchaud wrote:\n>>>> [...]\n>>>> Please don't change the remotebgcolor default.\n>>>>\n>>>> Also, perhaps the default remoterefbgcolor should be\n>>>>     set remoterefbgcolor $headbgcolor\n>>>> ?\n>>>>\n>>>> I say this because when I applied the series, without the last patch, I\n>>>> was miffed that the remote/ref colour had changed.\n>>>\n>>> This is a one-time inconvenience that gitk developers will experience. I\n>>> doubt that users jump backwards and forwards in gitk versions very often.\n>>\n>> In what way do you mean it's restricted to gitk developers?\n>\n> Maybe I misunderstood your objection.\n>\n> While developing this, I realized that the very first time your run gitk\n> (i.e., when you don't already have a configuration file), it writes the\n> then-current default colors into your configuration file. If you later\n> switch gitk versions to a version with different default colors, the\n> colors from the first-run version are preserved (unless the names of the\n> variables used to hold the colors are changed).\n>\n> So if you would run the tip version of my branch first, then the parent\n> of that version, you would continue to see the colors as modified by the\n> final commit. If you then switch to the master version, the remote\n> branch names go back to green (because it goes back to using\n> `headbgcolor` again), but the remote prefix stays light brown. I thought\n> you were unhappy about some form of this unexpected persistence problem.\n> But this problem will mostly be experienced by gitk developers who jump\n> back and forth between versions.\n>\n> A normal user probably mostly moves forward through version numbers, and\n> only occasionally. Such a user, jumping from master to the tip of my\n> branch (assuming they haven't customized anything), would see\n>\n> * local branches stay lime\n> * remote branch prefixes stay pale orange (they don't change to light\n> brown because the pale orange color from master is stored in their\n> configuration file)\n> * remote branch names change from lime to brown (because the\n> `remoterefbgcolor` configuration setting didn't exist before)\n>\n>> Patch 12 introduces remoterefbgcolor, with a specific default value.\n>> Prior to that, the \"ref part\" of remote refs was rendered with\n>> headbgcolor.  Users who changed their headbgcolor are used to seeing the\n>> \"ref part\" of remote refs in the same color as their local heads.\n>> Applying patch 12 changes the \"ref part\" color of remote refs, for such\n>> users.\n>>\n>> All I'm saying is that make the remoterefbgcolor default be $headbgcolor\n>> avoids this.\n>\n> For somebody who thinks that most people will want local and\n> remote-tracking branch names to be rendered in the same color, your\n> suggestion would be an improvement.\n>\n> But for somebody like me who thinks it is a good idea to render\n> remote-tracking branch names in a different color than local branch\n> names, this is a feature, not a bug. Even a user who explicitly\n> configured `headbgcolor` to, say, purple, wasn't necessarily expressing\n> a wish to have remote-tracking branch names rendered in purple. Until\n> now they had no choice to set these colors separately!\n>\n> So even for somebody who configured this setting before, I think that\n> having the remote-tracking branch names change color when the user\n> upgrades to this version is a good thing, because it lets the user know\n> that these two things can now be colored independently. If they don't\n> like the new default brown color, such a user knows where to change it\n> (even to make it agree with `headbgcolor` if they want that).\n>\n> But I understand that this is a matter of personal preference. I have\n> but one \"vote\" :-)\n\nI think we understand each other, and that we disagree.  I don't feel \nstrongly about it though, so if you want to go this way that's fine by me.\n\nYour case would be helped if the various ref colours were exposed in the \npreferences dialog.  Someone who upgrades to your gitk and doesn't like \nthe default remoterefbgcolor has to track down the right setting, close \nall running gitk instances, and hand-edit ~/.gitk.\n\nBut I think improving gitk's colour-preferences dialog is a bit beyond \nthe scope of your topic...\n\n\t\tM.\n\n"},{"id":"310925","messageId":"19aa8a8f-6f5e-ac90-277c-94d2b0caaa9a@xiplink.com","threadId":"44735","inReplyTo":"cover.1482164633.git.mhagger@alum.mit.edu","subject":"Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2017-02-06T17:13:19Z","receivedAt":"2017-02-06T17:13:25Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2016-12-19 11:44 AM, Michael Haggerty wrote:\n> This patch series changes a bunch of details about how remote-tracking\n> references are rendered in the commit list of gitk:\n\nI don't see this series in git v2.12.0-rc0, nor in Paul's gitk repo.\n\nI hope this is an oversight, and not that the series got dropped for \nsome reason.\n\n\t\tM.\n\n\n\n> * Omit the \"remote/\" prefix on normal remote-tracking references. They\n>   are already distinguished via their two-tone rendering and (usually)\n>   longer names, and this change saves a lot of visual clutter and\n>   horizontal space.\n>\n> * Render remote-tracking references that have more than the usual\n>   three slashes like\n>\n>       origin/foo/bar\n>       ^^^^^^^\n>\n>   rather than\n>\n>       origin/foo/bar (formerly remotes/origin/foo/bar)\n>       ^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^\n>\n>   , where the indicated part is the prefix that is rendered in a\n>   different color. Usually, such a reference represents a remote\n>   branch that contains a slash in its name, so the new split more\n>   accurately portrays the separation between remote name and remote\n>   branch name.\n>\n> * Introduce a separate constant to specify the background color used\n>   for the branch name part of remote-tracking references, to allow it\n>   to differ from the color used for local branches (which by default\n>   is bright green).\n>\n> * Change the default background colors for remote-tracking branches to\n>   light brown and brown (formerly they were pale orange and bright\n>   green).\n>\n> I understand that the colors of pixels on computer screens is an even\n> more emotional topic that that of bikesheds, so I implemented the last\n> change as a separate commit, the last one in the series. Feel free to\n> drop it if you don't want the default color change.\n>\n> Along the way, I did a bunch of refactoring in the area to make these\n> changes easier, and introduced a constant for the background color of\n> \"other\" references so that it can also be adjusted by users.\n>\n> (Unfortunately, these colors can only be adjusted by editing the\n> configuration file. Someday it would be nice to allow them to be\n> configured via the preferences dialog.)\n>\n> It's been a while since I've written any Tcl code, so I apologize in\n> advance for any howlers :-)\n>\n> This branch applies against the `master` branch in\n> git://ozlabs.org/~paulus/gitk.\n>\n> Michael\n>\n> Michael Haggerty (13):\n>   gitk: when processing tag labels, don't use `marks` as scratch space\n>   gitk: keep track of tag types in a separate `types` array\n>   gitk: use a type \"tags\" to indicate abbreviated tags\n>   gitk: use a type \"mainhead\" to indicate the main HEAD branch\n>   gitk: fill in `wvals` as the tags are first processed\n>   gitk: simplify regexp\n>   gitk: extract a method `remotereftext`\n>   gitk: only change the color of the \"remote\" part of remote refs\n>   gitk: shorten labels displayed for modern remote-tracking refs\n>   gitk: use type \"remote\" for remote-tracking references\n>   gitk: introduce a constant otherrefbgcolor\n>   gitk: add a configuration setting `remoterefbgcolor`\n>   gitk: change the default colors for remote-tracking references\n>\n>  gitk | 114 ++++++++++++++++++++++++++++++++++++++++++++-----------------------\n>  1 file changed, 76 insertions(+), 38 deletions(-)\n>\n"}]}