Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/git-gui/lib/branch.tcl # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / git-gui / lib / branch.tcl` 40 lines ยท 917 bytes Raw Blame History 1 # git-gui branch (create/delete) support 2 # Copyright (C) 2006, 2007 Shawn Pearce 3 4 proc load_all_heads {} { 5 global some_heads_tracking 6 7 set rh refs/heads 8 set rh_len [expr {[string length $rh] + 1}] 9 set all_heads [list] 10 set fd [git_read [list for-each-ref --format=%(refname) $rh]] 11 fconfigure $fd -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] 15 } 16 } 17 close $fd 18 19 return [lsort $all_heads] 20 } 21 22 proc load_all_tags {} { 23 set all_tags [list] 24 set fd [git_read [list for-each-ref \ 25 --sort=-taggerdate \ 26 --format=%(refname) \ 27 refs/tags]] 28 fconfigure $fd -encoding utf-8 29 while {[gets $fd line] > 0} { 30 if {![regsub ^refs/tags/ $line {} name]} continue 31 lappend all_tags $name 32 } 33 close $fd 34 return $all_tags 35 } 36 37 proc radio_selector {varname value args} { 38 upvar #0 $varname var 39 set var $value 40 }