From: Petr Baudis Date: Wed, 24 Sep 2008 23:32:47 +0000 (+0200) Subject: git-gui: Fix removing non-pushable remotes X-Git-Tag: v1.6.1-rc1~3^2~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2243ffcc6a445d1953297949e8e944fdc3df6ed7;p=git.git git-gui: Fix removing non-pushable remotes Git-gui does not add most of the remotes to the 'push' menu since they are missing the "Push" line in their remotespec. In that case, removing the remote would end up with an error. Signed-off-by: Petr Baudis Signed-off-by: Shawn O. Pearce --- diff --git a/lib/remote.tcl b/lib/remote.tcl index 185224735..b92b429cf 100644 --- a/lib/remote.tcl +++ b/lib/remote.tcl @@ -271,5 +271,6 @@ proc remove_remote {name} { delete_from_menu $remote_m.fetch $name delete_from_menu $remote_m.prune $name delete_from_menu $remote_m.remove $name - delete_from_menu $remote_m.push $name + # Not all remotes are in the push menu + catch { delete_from_menu $remote_m.push $name } }