Code

git-gui: Fix removing non-pushable remotes
authorPetr Baudis <pasky@suse.cz>
Wed, 24 Sep 2008 23:32:47 +0000 (01:32 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 30 Sep 2008 19:59:37 +0000 (12:59 -0700)
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 <pasky@suse.cz>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/remote.tcl

index 1852247358fcf390a8f996ed6a14df0f141bdd0d..b92b429cf766d525402047175ed0a69af015c682 100644 (file)
@@ -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 }
 }