You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
943 B
41 lines
943 B
18 years ago
|
# git-gui branch (create/delete) support
|
||
|
# Copyright (C) 2006, 2007 Shawn Pearce
|
||
|
|
||
|
proc load_all_heads {} {
|
||
18 years ago
|
global some_heads_tracking
|
||
18 years ago
|
|
||
18 years ago
|
set rh refs/heads
|
||
|
set rh_len [expr {[string length $rh] + 1}]
|
||
18 years ago
|
set all_heads [list]
|
||
18 years ago
|
set fd [git_read for-each-ref --format=%(refname) $rh]
|
||
5 years ago
|
fconfigure $fd -translation binary -encoding utf-8
|
||
18 years ago
|
while {[gets $fd line] > 0} {
|
||
18 years ago
|
if {!$some_heads_tracking || ![is_tracking_branch $line]} {
|
||
|
lappend all_heads [string range $line $rh_len end]
|
||
|
}
|
||
18 years ago
|
}
|
||
|
close $fd
|
||
|
|
||
18 years ago
|
return [lsort $all_heads]
|
||
18 years ago
|
}
|
||
|
|
||
|
proc load_all_tags {} {
|
||
|
set all_tags [list]
|
||
18 years ago
|
set fd [git_read for-each-ref \
|
||
|
--sort=-taggerdate \
|
||
|
--format=%(refname) \
|
||
|
refs/tags]
|
||
5 years ago
|
fconfigure $fd -translation binary -encoding utf-8
|
||
18 years ago
|
while {[gets $fd line] > 0} {
|
||
|
if {![regsub ^refs/tags/ $line {} name]} continue
|
||
|
lappend all_tags $name
|
||
|
}
|
||
|
close $fd
|
||
18 years ago
|
return $all_tags
|
||
18 years ago
|
}
|
||
|
|
||
|
proc radio_selector {varname value args} {
|
||
|
upvar #0 $varname var
|
||
|
set var $value
|
||
|
}
|