1 # git-gui branch (create/delete) support
2 # Copyright (C) 2006, 2007 Shawn Pearce
4 proc load_all_heads
{} {
5 global some_heads_tracking
8 set rh_len
[expr {[string length
$rh] + 1}]
10 set fd
[git_read for-each-ref
--format=%(refname
) $rh]
11 fconfigure $fd -translation binary -encoding utf-8
12 while {[gets $fd line
] > 0} {
13 if {!$some_heads_tracking ||
![is_tracking_branch
$line]} {
14 lappend all_heads
[string range
$line $rh_len end
]
19 return [lsort $all_heads]
22 proc load_all_tags
{} {
24 set fd
[git_read for-each-ref
\
28 fconfigure $fd -translation binary -encoding utf-8
29 while {[gets $fd line
] > 0} {
30 if {![regsub ^refs
/tags
/ $line {} name
]} continue
31 lappend all_tags
$name
37 proc radio_selector
{varname value args
} {