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

Re: [PATCH 5/6] config docs: Provide for config to specify tags not to abbreviate

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 9, 2016, 05:55 UTC
Message-ID
<xmqqa8d9b3jh.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<22562.32428.287354.214659@chiark.greenend.org.uk>
Ian Jackson <ijackson@chiark.greenend.org.uk> writes:
Show 14 quoted lines
>> I think the two things I found weird were:
>> 
>>   - it's in the "log" section, which makes me think it's an option for
>>     git-log. But it's not. I'm not sure what the _right_ section is, but
>>     hopefully it would make it clear that this is command-agnostic.
>> 
>>     Something like "gui.abbrevTags" might be OK (and as you note, has
>>     precedence). But of course it's possible that a command like "tig"
>>     could learn to support it.  I'm not sure if that counts as a GUI or
>>     not. :)
>
> I don't really have an opinion about the name.  gui.abbrevTags would
> be a possibility.  (It's a bit odd that implicitly, the default would
> be `*'.)

I have trouble with both "log" and "abbrev" in the name. Perhaps I am biased by our recent discussion on a feature in the core that we use the word "abbrev" to describe, but I fear that most Git users, when told the word, would imagine the act of shortening 40-hex full object name down to shorter but still unique prefix, not the "this refname is too long, so let's show only the first few letters in GUI label".

And I do not think we would want "log" or any core side Porcelain command to have too many "information losing" options like this "truncate refnames down to a point where it is no longer unique and meaningful". GUI tools can get away with doing sos because they can arrange these truncated labels to react to end-user input (e.g. the truncated Tag in the history display of gitk could be made to react to mouse-over and pop-up to show a full name, for example), but the output from the core side is pretty much fixed once it is emitted.

So my first preference would be to teach gitk such a "please clarify" UI-reaction, if it does not know how to do so yet. There is no need for a configuration variable anywhere with this approach.

If you do want to add a configuration to show fuller name in the tag, which would make it unnecessary for the user to do "please clarify, as I am hovering over what I want to get details of" action, that may also be a good way to go. But I think the right place to do so would be Edit -> Preferences menu in Gitk, and the settings will be stored in ~/.gitk or ~/.config/git/gitk or whatever gitk-specific place.

Previous: Ian JacksonNext: Ian Jackson
Message 11 of 18 in “Provide for config to specify tags not to abbreviate”
  1. 0/6 Provide for config to specify tags not to abbreviateIan Jackson, Nov 8, 2016
  2. 3/6 gitk: drawtags: Introduce concept of unabbreviated marksIan Jackson, Nov 8, 2016
  3. 2/6 gitk: Internal: drawtags: Idempotently reset "ntags"Ian Jackson, Nov 8, 2016
  4. 1/6 gitk: Internal: drawtags: Abolish "singletag" variableIan Jackson, Nov 8, 2016
  5. 4/6 gitk: Provide for config to specify tags not to abbreviateIan Jackson, Nov 8, 2016
  6. 5/6 config docs: Provide for config to specify tags not to abbreviateIan Jackson, Nov 8, 2016
  7. Jacob KellerNov 8, 2016
  8. Ian JacksonNov 8, 2016
  9. Jeff KingNov 8, 2016
  10. Ian JacksonNov 9, 2016
  11. Junio C HamanoNov 9, 2016
  12. Ian JacksonNov 9, 2016
  13. Junio C HamanoNov 9, 2016
  14. Ian JacksonNov 9, 2016
  15. Markus HitterNov 10, 2016
  16. Ian JacksonNov 8, 2016
  17. Markus HitterNov 8, 2016
  18. Ian JacksonNov 8, 2016

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.