git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 00/13] gitk: tweak rendering of remote-tracking references

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Dec 21, 2016, 00:05 UTC
Message-ID
<046b088c-afd5-66b9-fe3c-255e42a7d768@alum.mit.edu>
In-Reply-To
<97d97bc6-54f1-2ef2-fe04-7e7f144d7e51@xiplink.com>
On 12/20/2016 04:01 PM, Marc Branchaud wrote:
Show 19 quoted lines
> On 2016-12-19 11:44 AM, Michael Haggerty wrote:
>> This patch series changes a bunch of details about how remote-tracking
>> references are rendered in the commit list of gitk:
> 
> Thanks for this!  I like the new, compact look very much!
> 
> That said, I remember when I was a new git user and I leaned heavily on
> gitk to understand how references worked.  It was particularly
> illuminating to see the remote references distinctly labeled, and the
> fact that they were "remotes/origin/foo" gave me an Aha! moment where I
> came to understand that the refs hierarchy is more flexible than just
> the conventions coded into git itself.  I eventually felt free to create
> my own, private ref hierarchies.
> 
> I am in no way opposed to this series.  I just wanted to point out that
> there was some utility in those labels.  It makes me think that it might
> be worthwhile for gitk to have a "raw-refs" mode, that shows the full
> "refs/foo/bar/baz" paths of all the heads, tags, and whatever else.  It
> could be a useful teaching tool for git.

Yes, I understand that the longer names might be useful for beginners, and the full names even more so. However, I think once a user has that "aha!" moment, the space wasted on all the redundant words is a real impediment to gitk's usability. It is common to have a few references on a single commit (especially if you pull from multiple remotes), in which case the summary line is completely invisible (and therefore its context menu is unreachable). I don't like the idea of dumbing down the UI permanently based on what users need at the very beginning of their Git usage.

Would it be possible to use the short names in the UI but to add the full names to a tooltip or to the context menu?

>> * Omit the "remote/" prefix on normal remote-tracking references. They
> 
> If you re-roll, s:remote/:remotes/:.
Thanks.
Show 40 quoted lines
>>   are already distinguished via their two-tone rendering and (usually)
>>   longer names, and this change saves a lot of visual clutter and
>>   horizontal space.
>>
>> * Render remote-tracking references that have more than the usual
>>   three slashes like
>>
>>       origin/foo/bar
>>       ^^^^^^^
>>
>>   rather than
>>
>>       origin/foo/bar (formerly remotes/origin/foo/bar)
>>       ^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^
>>
>>   , where the indicated part is the prefix that is rendered in a
>>   different color. Usually, such a reference represents a remote
>>   branch that contains a slash in its name, so the new split more
>>   accurately portrays the separation between remote name and remote
>>   branch name.
> 
> *Love* this change!  :)
> 
>> * Introduce a separate constant to specify the background color used
>>   for the branch name part of remote-tracking references, to allow it
>>   to differ from the color used for local branches (which by default
>>   is bright green).
>>
>> * Change the default background colors for remote-tracking branches to
>>   light brown and brown (formerly they were pale orange and bright
>>   green).
> 
> Please don't change the remotebgcolor default.
> 
> Also, perhaps the default remoterefbgcolor should be
>     set remoterefbgcolor $headbgcolor
> ?
> 
> I say this because when I applied the series, without the last patch, I
> was miffed that the remote/ref colour had changed.

This is a one-time inconvenience that gitk developers will experience. I doubt that users jump backwards and forwards in gitk versions very often.

I do find it strange that gitk writes a color selection to its configuration file *even if the user has left it at its default*. Normally I would expect only user-changed settings to be written to the config file, and other values to use the default that is built into the program. For example, such an approach would have made the transition from "green" to "lime" easier.

> [...]

Thanks for your feedback! Michael

Previous: Marc BranchaudNext: Marc Branchaud
Message 20 of 24 in “gitk: tweak rendering of remote-tracking references”
  1. 00/13 gitk: tweak rendering of remote-tracking referencesMichael Haggerty, Dec 19, 2016
  2. 01/13 gitk: when processing tag labels, don't use `marks` as scratch spaceMichael Haggerty, Dec 19, 2016
  3. 02/13 gitk: keep track of tag types in a separate `types` arrayMichael Haggerty, Dec 19, 2016
  4. 12/13 gitk: add a configuration setting `remoterefbgcolor`Michael Haggerty, Dec 19, 2016
  5. 07/13 gitk: extract a method `remotereftext`Michael Haggerty, Dec 19, 2016
  6. 06/13 gitk: simplify regexpMichael Haggerty, Dec 19, 2016
  7. 04/13 gitk: use a type "mainhead" to indicate the main HEAD branchMichael Haggerty, Dec 19, 2016
  8. 08/13 gitk: only change the color of the "remote" part of remote refsMichael Haggerty, Dec 19, 2016
  9. 05/13 gitk: fill in `wvals` as the tags are first processedMichael Haggerty, Dec 19, 2016
  10. 09/13 gitk: shorten labels displayed for modern remote-tracking refsMichael Haggerty, Dec 19, 2016
  11. 10/13 gitk: use type "remote" for remote-tracking referencesMichael Haggerty, Dec 19, 2016
  12. 11/13 gitk: introduce a constant otherrefbgcolorMichael Haggerty, Dec 19, 2016
  13. 13/13 gitk: change the default colors for remote-tracking referencesMichael Haggerty, Dec 19, 2016
  14. 03/13 gitk: use a type "tags" to indicate abbreviated tagsMichael Haggerty, Dec 19, 2016
  15. Philip OakleyDec 19, 2016
  16. Michael HaggertyDec 20, 2016
  17. Marc BranchaudDec 20, 2016
  18. Paul MackerrasDec 20, 2016
  19. Marc BranchaudDec 20, 2016
  20. Michael HaggertyDec 21, 2016
  21. Marc BranchaudDec 21, 2016
  22. Michael HaggertyDec 22, 2016
  23. Marc BranchaudJan 9, 2017
  24. Marc BranchaudFeb 6, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.