* 'master' of https://github.com/j6t/git-gui: (21 commits)
git-gui: ensure own version of git-gui--askpass is used
git-gui: Allow Tcl 9.0
git-gui: use -profile tcl8 on encoding conversions
git-gui: use -profile tcl8 for file input with Tcl 9
git-gui: themed.tcl: use full namespace for color
git-gui: remove EOL translation for gets
git-gui: honor TCLTK_PATH in git-gui--askpass
git-gui: retire Git Gui.app
git-gui: fix dependency of GITGUI_MAIN on generator
git-gui: remove uname_O in Makefile
git-gui i18n: Remove the locations within the Bulgarian translation
git-gui i18n: Update Bulgarian translation (557t)
git-gui: do not mix -translation binary and -encoding
git-gui: replace encoding binary with iso8859-1
git-gui: translation binary defines iso8859-1
git-gui: assure -eofchar {} on all channels
git-gui: use /cmd/git-gui.exe for shortcut
git-gui: Windows tk_getSaveFile is not useful for shortcuts
git-gui: let nice work on Windows
git-gui: do not add directories to PATH on Windows
...
41 lines
917 B
Tcl
41 lines
917 B
Tcl
# git-gui branch (create/delete) support
|
|
# Copyright (C) 2006, 2007 Shawn Pearce
|
|
|
|
proc load_all_heads {} {
|
|
global some_heads_tracking
|
|
|
|
set rh refs/heads
|
|
set rh_len [expr {[string length $rh] + 1}]
|
|
set all_heads [list]
|
|
set fd [git_read [list for-each-ref --format=%(refname) $rh]]
|
|
fconfigure $fd -encoding utf-8
|
|
while {[gets $fd line] > 0} {
|
|
if {!$some_heads_tracking || ![is_tracking_branch $line]} {
|
|
lappend all_heads [string range $line $rh_len end]
|
|
}
|
|
}
|
|
close $fd
|
|
|
|
return [lsort $all_heads]
|
|
}
|
|
|
|
proc load_all_tags {} {
|
|
set all_tags [list]
|
|
set fd [git_read [list for-each-ref \
|
|
--sort=-taggerdate \
|
|
--format=%(refname) \
|
|
refs/tags]]
|
|
fconfigure $fd -encoding utf-8
|
|
while {[gets $fd line] > 0} {
|
|
if {![regsub ^refs/tags/ $line {} name]} continue
|
|
lappend all_tags $name
|
|
}
|
|
close $fd
|
|
return $all_tags
|
|
}
|
|
|
|
proc radio_selector {varname value args} {
|
|
upvar #0 $varname var
|
|
set var $value
|
|
}
|