Adi Shavit Adi Shavit - 1 month ago 3x
Git Question

Get gitk to show full tag names

Is it possible to get

to show the full tag names instead of a shortened version. When I use long names I just see "tag...":

enter image description here


Here is the relevant code, from /usr/bin/gitk in my Ubuntu Xenial machine:

set marks {}
set ntags 0
set nheads 0
set singletag 0
set maxtags 3
set maxtagpct 25
set maxwidth [expr {[graph_pane_width] * $maxtagpct / 100}]
set delta [expr {int(0.5 * ($linespc - $lthickness))}]
set extra [expr {$delta + $lthickness + $linespc}]

if {[info exists idtags($id)]} {
    set marks $idtags($id)
    set ntags [llength $marks]
    if {$ntags > $maxtags ||
        [totalwidth $marks mainfont $extra] > $maxwidth} {
        # show just a single "n tags..." tag
        set singletag 1
        if {$ntags == 1} {
            set marks [list "tag..."]
        } else {
            set marks [list [format "%d tags..." $ntags]]
        set ntags 1

Given that, the options that I see are

  • to increase the width of the panel, by moving the author divider further over to the right

  • to hack that code, e.g. by increasing maxtagpct so that the tag name is allowed to occupy more of the available width.

I don't think there's anything there that is controlled by an already exposed configuration setting.