git-gui: Rename all_branches -> all_heads.
authorShawn O. Pearce <spearce@spearce.org>
Sat, 25 Nov 2006 08:35:33 +0000 (03:35 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 25 Nov 2006 08:35:33 +0000 (03:35 -0500)
Since this list is really the set of refs which match "refs/heads/*" it
really is the set of heads and not necessarily the set of all branches,
as the remote tracking branches are not listed in this set, even if it
appears in the "refs/heads/*" namespace (e.g. an old style repository).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui

diff --git a/git-gui b/git-gui
index 7406238c9029b2cd4639361c34c50d2e910c64d0..6035105f8e54d806a627529aa8a6363605819e11 100755 (executable)
--- a/git-gui
+++ b/git-gui
@@ -1609,10 +1609,10 @@ proc write_checkout_index {fd pathList totalCnt batch msg after} {
 ##
 ## branch management
 
-proc load_all_branches {} {
-       global all_branches tracking_branches
+proc load_all_heads {} {
+       global all_heads tracking_branches
 
-       set all_branches [list]
+       set all_heads [list]
        set cmd [list git for-each-ref]
        lappend cmd --format=%(refname)
        lappend cmd refs/heads
@@ -1620,18 +1620,18 @@ proc load_all_branches {} {
        while {[gets $fd line] > 0} {
                if {![catch {set info $tracking_branches($line)}]} continue
                if {![regsub ^refs/heads/ $line {} name]} continue
-               lappend all_branches $name
+               lappend all_heads $name
        }
        close $fd
 
-       set all_branches [lsort $all_branches]
+       set all_heads [lsort $all_heads]
 }
 
 proc populate_branch_menu {m} {
-       global all_branches disable_on_lock
+       global all_heads disable_on_lock
 
        $m add separator
-       foreach b $all_branches {
+       foreach b $all_heads {
                $m add radiobutton \
                        -label $b \
                        -command [list switch_branch $b] \
@@ -3674,7 +3674,7 @@ user.email settings into your personal
 
 if {!$single_commit} {
        load_all_remotes
-       load_all_branches
+       load_all_heads
        populate_branch_menu .mbar.branch
        populate_fetch_menu .mbar.fetch
        populate_pull_menu .mbar.pull