X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-gui%2Flib%2Ftransport.tcl;h=e5d211edea05cbfb856e81a9d683a5fb0f4f4b20;hb=31e3d834b39b773831c3c3e2637f2d99bfad9cbf;hp=60e3a642c5fb7f1526c9feb1a1d3a495db7728f8;hpb=7d0cf357a31cc8a442342696788d776265482ce9;p=git.git diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl index 60e3a642c..e5d211ede 100644 --- a/git-gui/lib/transport.tcl +++ b/git-gui/lib/transport.tcl @@ -20,6 +20,35 @@ proc prune_from {remote} { console::exec $w [list git remote prune $remote] } +proc fetch_from_all {} { + set w [console::new \ + [mc "fetch all remotes"] \ + [mc "Fetching new changes from all remotes"]] + + set cmd [list git fetch --all] + if {[is_config_true gui.pruneduringfetch]} { + lappend cmd --prune + } + + console::exec $w $cmd +} + +proc prune_from_all {} { + global all_remotes + + set w [console::new \ + [mc "remote prune all remotes"] \ + [mc "Pruning tracking branches deleted from all remotes"]] + + set cmd [list git remote prune] + + foreach r $all_remotes { + lappend cmd $r + } + + console::exec $w $cmd +} + proc push_to {remote} { set w [console::new \ [mc "push %s" $remote] \ @@ -95,6 +124,7 @@ proc do_push_anywhere {} { set w .push_setup toplevel $w + catch {wm attributes $w -type dialog} wm withdraw $w wm geometry $w "+[winfo rootx .]+[winfo rooty .]" pave_toplevel $w @@ -123,6 +153,7 @@ proc do_push_anywhere {} { $w.source.l insert end $h if {$h eq $current_branch} { $w.source.l select set end + $w.source.l yview end } } pack $w.source.l -side left -fill both -expand 1 @@ -135,7 +166,9 @@ proc do_push_anywhere {} { -value remote \ -variable push_urltype if {$use_ttk} { - ttk::combobox $w.dest.remote_m -textvariable push_remote \ + ttk::combobox $w.dest.remote_m -state readonly \ + -exportselection false \ + -textvariable push_remote \ -values $all_remotes } else { eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes