@@ -1677,6 +1677,7 @@ proc readrefs {} {
1677
1677
global tagids idtags headids idheads tagobjid
1678
1678
global otherrefids idotherrefs mainhead mainheadid
1679
1679
global selecthead selectheadid
1680
+ global hideremotes
1680
1681
1681
1682
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
1682
1683
catch {unset $v }
@@ -1689,7 +1690,7 @@ proc readrefs {} {
1689
1690
if {![string match " refs/*" $ref ]} continue
1690
1691
set name [string range $ref 5 end]
1691
1692
if {[string match " remotes/*" $name ]} {
1692
- if {![string match " */HEAD" $name ]} {
1693
+ if {![string match " */HEAD" $name ] && ! $hideremotes } {
1693
1694
set headids($name ) $id
1694
1695
lappend idheads($id ) $name
1695
1696
}
@@ -2520,6 +2521,7 @@ proc savestuff {w} {
2520
2521
global cmitmode wrapcomment datetimeformat limitdiffs
2521
2522
global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor
2522
2523
global autoselect extdifftool perfile_attrs markbgcolor
2524
+ global hideremotes
2523
2525
2524
2526
if {$stuffsaved } return
2525
2527
if {![winfo viewable .]} return
@@ -2539,6 +2541,7 @@ proc savestuff {w} {
2539
2541
puts $f [list set wrapcomment $wrapcomment ]
2540
2542
puts $f [list set autoselect $autoselect ]
2541
2543
puts $f [list set showneartags $showneartags ]
2544
+ puts $f [list set hideremotes $hideremotes ]
2542
2545
puts $f [list set showlocalchanges $showlocalchanges ]
2543
2546
puts $f [list set datetimeformat $datetimeformat ]
2544
2547
puts $f [list set limitdiffs $limitdiffs ]
@@ -10383,6 +10386,7 @@ proc doprefs {} {
10383
10386
global oldprefs prefstop showneartags showlocalchanges
10384
10387
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
10385
10388
global tabstop limitdiffs autoselect extdifftool perfile_attrs
10389
+ global hideremotes
10386
10390
10387
10391
set top .gitkprefs
10388
10392
set prefstop $top
@@ -10391,7 +10395,7 @@ proc doprefs {} {
10391
10395
return
10392
10396
}
10393
10397
foreach v {maxwidth maxgraphpct showneartags showlocalchanges \
10394
- limitdiffs tabstop perfile_attrs} {
10398
+ limitdiffs tabstop perfile_attrs hideremotes } {
10395
10399
set oldprefs($v ) [set $v ]
10396
10400
}
10397
10401
toplevel $top
@@ -10423,6 +10427,9 @@ proc doprefs {} {
10423
10427
checkbutton $top .ntag -text [mc " Display nearby tags" ] \
10424
10428
-font optionfont -variable showneartags
10425
10429
grid x $top .ntag -sticky w
10430
+ checkbutton $top .hideremotes -text [mc " Hide remote refs" ] \
10431
+ -font optionfont -variable hideremotes
10432
+ grid x $top .hideremotes -sticky w
10426
10433
checkbutton $top .ldiff -text [mc " Limit diffs to listed paths" ] \
10427
10434
-font optionfont -variable limitdiffs
10428
10435
grid x $top .ldiff -sticky w
@@ -10547,7 +10554,7 @@ proc prefscan {} {
10547
10554
global oldprefs prefstop
10548
10555
10549
10556
foreach v {maxwidth maxgraphpct showneartags showlocalchanges \
10550
- limitdiffs tabstop perfile_attrs} {
10557
+ limitdiffs tabstop perfile_attrs hideremotes } {
10551
10558
global $v
10552
10559
set $v $oldprefs($v)
10553
10560
}
@@ -10561,6 +10568,7 @@ proc prefsok {} {
10561
10568
global oldprefs prefstop showneartags showlocalchanges
10562
10569
global fontpref mainfont textfont uifont
10563
10570
global limitdiffs treediffs perfile_attrs
10571
+ global hideremotes
10564
10572
10565
10573
catch {destroy $prefstop }
10566
10574
unset prefstop
@@ -10606,6 +10614,9 @@ proc prefsok {} {
10606
10614
$limitdiffs != $oldprefs(limitdiffs) } {
10607
10615
reselectline
10608
10616
}
10617
+ if {$hideremotes != $oldprefs(hideremotes) } {
10618
+ rereadrefs
10619
+ }
10609
10620
}
10610
10621
10611
10622
proc formatdate {d} {
@@ -11011,6 +11022,7 @@ set mingaplen 100
11011
11022
set cmitmode " patch"
11012
11023
set wrapcomment " none"
11013
11024
set showneartags 1
11025
+ set hideremotes 0
11014
11026
set maxrefs 20
11015
11027
set maxlinelen 200
11016
11028
set showlocalchanges 1
0 commit comments