X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-gui%2Flib%2Ftransport.tcl;h=e8ebc6eda090faed16c80ba748d21c0c53f9f2a4;hb=0f2890acd999e63892d0b5b401e70bdaefe3ba51;hp=c0e7d20fce67349938373c0cfdf879aa3137d18f;hpb=c80e07d4959591f5addcd48c7d42017b40c25f36;p=git.git diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl index c0e7d20fc..e8ebc6eda 100644 --- a/git-gui/lib/transport.tcl +++ b/git-gui/lib/transport.tcl @@ -5,9 +5,19 @@ proc fetch_from {remote} { set w [console::new \ "fetch $remote" \ "Fetching new changes from $remote"] - set cmd [list git fetch] - lappend cmd $remote - console::exec $w $cmd + set cmds [list] + lappend cmds [list exec git fetch $remote] + if {[is_config_true gui.pruneduringfetch]} { + lappend cmds [list exec git remote prune $remote] + } + console::chain $w $cmds +} + +proc prune_from {remote} { + set w [console::new \ + "remote prune $remote" \ + "Pruning tracking branches deleted from $remote"] + console::exec $w [list git remote prune $remote] } proc push_to {remote} {