@matheusbsbs / matheus-bagliano / commits / 4bfa2502f7
Fork 0

git-gui: fetch/prune all entry only for more than one entry

In case there is only one remote a fetch/prune all entry is redundant. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Tested-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Heiko Voigt committed Feb 22, 2011 at 20:28 UTC 4bfa2502f7e2dac52d8af46ee5abe0acf848607b
1 file changed +2 -2
lib/remote.tcl
+2 -2
@@ -237,13 +237,13 @@ proc update_all_remotes_menu_entry {} {
237
238 set have_remote 0
239 foreach r $all_remotes {
240 - set have_remote 1
240 + incr have_remote
241 }
242
243 set remote_m .mbar.remote
244 set fetch_m $remote_m.fetch
245 set prune_m $remote_m.prune
246 - if {$have_remote} {
246 + if {$have_remote > 1} {
247 make_sure_remote_submenues_exist $remote_m
248 set index [expr {[$fetch_m type 0] eq "tearoff" ? 1 : 0}]
249 if {[$fetch_m entrycget $index -label] ne "All"} {