@@ -2652,7 +2652,7 @@ proc savestuff {w} {
2652
2652
global viewname viewfiles viewargs viewargscmd viewperm nextviewnum
2653
2653
global cmitmode wrapcomment datetimeformat limitdiffs
2654
2654
global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor
2655
- global autoselect extdifftool perfile_attrs markbgcolor use_ttk
2655
+ global autoselect autosellen extdifftool perfile_attrs markbgcolor use_ttk
2656
2656
global hideremotes want_ttk
2657
2657
2658
2658
if {$stuffsaved } return
@@ -2673,6 +2673,7 @@ proc savestuff {w} {
2673
2673
puts $f [list set cmitmode $cmitmode ]
2674
2674
puts $f [list set wrapcomment $wrapcomment ]
2675
2675
puts $f [list set autoselect $autoselect ]
2676
+ puts $f [list set autosellen $autosellen ]
2676
2677
puts $f [list set showneartags $showneartags ]
2677
2678
puts $f [list set hideremotes $hideremotes ]
2678
2679
puts $f [list set showlocalchanges $showlocalchanges ]
@@ -6300,6 +6301,7 @@ proc drawtags {id x xt y1} {
6300
6301
-width $lthickness -fill black -tags tag.$id ]
6301
6302
$canv lower $t
6302
6303
foreach tag $marks x $xvals wid $wvals {
6304
+ set tag_quoted [string map {% %%} $tag ]
6303
6305
set xl [expr {$x + $delta }]
6304
6306
set xr [expr {$x + $delta + $wid + $lthickness }]
6305
6307
set font mainfont
@@ -6308,7 +6310,7 @@ proc drawtags {id x xt y1} {
6308
6310
set t [$canv create polygon $x [expr {$yt + $delta }] $xl $yt \
6309
6311
$xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta }] \
6310
6312
-width 1 -outline black -fill yellow -tags tag.$id ]
6311
- $canv bind $t <1> [list showtag $tag 1]
6313
+ $canv bind $t <1> [list showtag $tag_quoted 1]
6312
6314
set rowtextx([rowofcommit $id ]) [expr {$xr + $linespc }]
6313
6315
} else {
6314
6316
# draw a head or other ref
@@ -6335,9 +6337,9 @@ proc drawtags {id x xt y1} {
6335
6337
set t [$canv create text $xl $y1 -anchor w -text $tag -fill $fgcolor \
6336
6338
-font $font -tags [list tag.$id text]]
6337
6339
if {$ntags >= 0} {
6338
- $canv bind $t <1> [list showtag $tag 1]
6340
+ $canv bind $t <1> [list showtag $tag_quoted 1]
6339
6341
} elseif {$nheads >= 0} {
6340
- $canv bind $t $ctxbut [list headmenu %X %Y $id $tag ]
6342
+ $canv bind $t $ctxbut [list headmenu %X %Y $id $tag_quoted ]
6341
6343
}
6342
6344
}
6343
6345
return $xt
@@ -6896,7 +6898,7 @@ proc selectline {l isnew {desired_loc {}}} {
6896
6898
global mergemax numcommits pending_select
6897
6899
global cmitmode showneartags allcommits
6898
6900
global targetrow targetid lastscrollrows
6899
- global autoselect jump_to_here
6901
+ global autoselect autosellen jump_to_here
6900
6902
6901
6903
catch {unset pending_select}
6902
6904
$canv delete hover
@@ -6958,7 +6960,7 @@ proc selectline {l isnew {desired_loc {}}} {
6958
6960
$sha1entry delete 0 end
6959
6961
$sha1entry insert 0 $id
6960
6962
if {$autoselect } {
6961
- $sha1entry selection range 0 end
6963
+ $sha1entry selection range 0 $autosellen
6962
6964
}
6963
6965
rhighlight_sel $id
6964
6966
@@ -9063,7 +9065,7 @@ proc cherrypick {} {
9063
9065
to file '%s'.\n Please commit, reset or stash\
9064
9066
your changes and try again." $fname ]
9065
9067
} elseif {[regexp -line \
9066
- {^(CONFLICT \(.*\):|Automatic cherry-pick failed)} \
9068
+ {^(CONFLICT \(.*\):|Automatic cherry-pick failed|error: could not apply )} \
9067
9069
$err ]} {
9068
9070
if {[confirm_popup [mc " Cherry-pick failed because of merge\
9069
9071
conflict.\n Do you wish to run git citool to\
@@ -10756,7 +10758,7 @@ proc doprefs {} {
10756
10758
global maxwidth maxgraphpct use_ttk NS
10757
10759
global oldprefs prefstop showneartags showlocalchanges
10758
10760
global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
10759
- global tabstop limitdiffs autoselect extdifftool perfile_attrs
10761
+ global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs
10760
10762
global hideremotes want_ttk have_ttk
10761
10763
10762
10764
set top .gitkprefs
@@ -10784,9 +10786,10 @@ proc doprefs {} {
10784
10786
${NS} ::checkbutton $top .showlocal -text [mc " Show local changes" ] \
10785
10787
-variable showlocalchanges
10786
10788
grid x $top .showlocal -sticky w
10787
- ${NS} ::checkbutton $top .autoselect -text [mc " Auto-select SHA1" ] \
10789
+ ${NS} ::checkbutton $top .autoselect -text [mc " Auto-select SHA1 (length) " ] \
10788
10790
-variable autoselect
10789
- grid x $top .autoselect -sticky w
10791
+ spinbox $top .autosellen -from 1 -to 40 -width 4 -textvariable autosellen
10792
+ grid x $top .autoselect $top .autosellen -sticky w
10790
10793
${NS} ::checkbutton $top .hideremotes -text [mc " Hide remote refs" ] \
10791
10794
-variable hideremotes
10792
10795
grid x $top .hideremotes -sticky w
@@ -11428,6 +11431,7 @@ set showlocalchanges 1
11428
11431
set limitdiffs 1
11429
11432
set datetimeformat " %Y-%m-%d %H:%M:%S"
11430
11433
set autoselect 1
11434
+ set autosellen 40
11431
11435
set perfile_attrs 0
11432
11436
set want_ttk 1
11433
11437
@@ -11581,7 +11585,7 @@ if {![info exists have_ttk]} {
11581
11585
set use_ttk [expr {$have_ttk && $want_ttk }]
11582
11586
set NS [expr {$use_ttk ? " ttk" : " " }]
11583
11587
11584
- set git_version [ join [ lrange [ split [ lindex [ exec git version] end] .] 0 2] .]
11588
+ regexp {^git version ([\d.]*\d)} [ exec git version] _ git_version
11585
11589
11586
11590
set show_notes {}
11587
11591
if {[package vcompare $git_version " 1.6.6.2" ] >= 0} {
0 commit comments