path: root/
diff options
authorShawn O. Pearce <>2007-10-08 05:23:54 (GMT)
committerShawn O. Pearce <>2007-10-10 05:12:17 (GMT)
commit6bdf5e5f20c792ad0c5d5ba941d7e637aca86d32 (patch)
tree31afd464266edb04697bfa21b8a9a454abfb8136 /
parent1cad232f92794834c8e70dfc0a1f35431d2c05cd (diff)
git-gui: Consolidate the Fetch and Push menus into a Remote menu
Sometimes the Fetch menu looks really odd, such as if you are in a repository that has no remotes configured when you start git-gui. Here we didn't have any items to add to the Fetch menu so it was a tad confusing for the end-user to see an empty menu on the menu bar. We now place all of the commands related to fetching and pushing of changes into a single "Remote" menu. This way we have a better class of bucket that we can drop additional remote related items into such as doing a remote merge or editing the remote configuration specs. The shortcuts to execute fetch/remote prune/push on existing remote specifications are now actually submenus listing the remotes by name. Signed-off-by: Shawn O. Pearce <>
Diffstat (limited to '')
1 files changed, 13 insertions, 7 deletions
diff --git a/ b/
index ca39113..c8307a6 100755
--- a/
+++ b/
@@ -1792,8 +1792,7 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
if {[is_enabled transport]} {
.mbar add cascade -label [mc Merge] -menu .mbar.merge
- .mbar add cascade -label [mc Fetch] -menu .mbar.fetch
- .mbar add cascade -label [mc Push] -menu .mbar.push
+ .mbar add cascade -label [mc Remote] -menu .mbar.remote
. configure -menu .mbar
@@ -2000,13 +1999,14 @@ if {[is_enabled branch]} {
# -- Transport Menu
if {[is_enabled transport]} {
- menu .mbar.fetch
+ menu .mbar.remote
- menu .mbar.push
- .mbar.push add command -label [mc "Push..."] \
+ .mbar.remote add command \
+ -label [mc "Push..."] \
-command do_push_anywhere \
-accelerator $M1T-P
- .mbar.push add command -label [mc "Delete..."] \
+ .mbar.remote add command \
+ -label [mc "Delete..."] \
-command remote_branch_delete::dialog
@@ -2720,8 +2720,14 @@ settings into your personal
if {[is_enabled transport]} {
- populate_fetch_menu
+ set n [.mbar.remote index end]
+ populate_fetch_menu
+ set n [expr {[.mbar.remote index end] - $n}]
+ if {$n > 0} {
+ .mbar.remote insert $n separator
+ }
+ unset n
if {[winfo exists $ui_comm]} {