@matheusbsbs / matheus-bagliano / commits / bb1ad51a53
Fork 0

git-gui: Rename all_branches -> all_heads.

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>

Shawn O. Pearce committed Nov 25, 2006 at 03:35 UTC bb1ad51a5365cbe48d5dcee7e00a8d9f90d89171
1 file changed +8 -8
git-gui
+8 -8
@@ -1609,10 +1609,10 @@ proc write_checkout_index {fd pathList totalCnt batch msg after} {
1609 ##
1610 ## branch management
1611
1612 -proc load_all_branches {} {
1613 - global all_branches tracking_branches
1612 +proc load_all_heads {} {
1613 + global all_heads tracking_branches
1614
1615 - set all_branches [list]
1615 + set all_heads [list]
1616 set cmd [list git for-each-ref]
1617 lappend cmd --format=%(refname)
1618 lappend cmd refs/heads
@@ -1620,18 +1620,18 @@ proc load_all_branches {} {
1620 while {[gets $fd line] > 0} {
1621 if {![catch {set info $tracking_branches($line)}]} continue
1622 if {![regsub ^refs/heads/ $line {} name]} continue
1623 - lappend all_branches $name
1623 + lappend all_heads $name
1624 }
1625 close $fd
1626
1627 - set all_branches [lsort $all_branches]
1627 + set all_heads [lsort $all_heads]
1628 }
1629
1630 proc populate_branch_menu {m} {
1631 - global all_branches disable_on_lock
1631 + global all_heads disable_on_lock
1632
1633 $m add separator
1634 - foreach b $all_branches {
1634 + foreach b $all_heads {
1635 $m add radiobutton \
1636 -label $b \
1637 -command [list switch_branch $b] \
@@ -3674,7 +3674,7 @@ user.email settings into your personal
3674
3675 if {!$single_commit} {
3676 load_all_remotes
3677 - load_all_branches
3677 + load_all_heads
3678 populate_branch_menu .mbar.branch
3679 populate_fetch_menu .mbar.fetch
3680 populate_pull_menu .mbar.pull