[PATCH] Fix removing non-pushable remotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

---

Note that I think this should be abandoned and all remotes
added to the push menu. Having the push part of the remotespec
is actually a very rare situation and it is just not there
in most of the cases, relying on default git push behaviour.

 git-gui/lib/remote.tcl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-gui/lib/remote.tcl b/git-gui/lib/remote.tcl
index 1852247..b92b429 100644
--- a/git-gui/lib/remote.tcl
+++ b/git-gui/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 }
 }
-- 
tg: (17f0c43..) t/git-gui/remove-push (depends on: git-gui/remotes)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux