git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix removing non-pushable remotes

From
Petr Baudis <pasky@suse.cz>
Date
Sep 24, 2008, 23:32 UTC
Message-ID
<1222299167-4305-1-git-send-email-pasky@suse.cz>
In-Reply-To
<20080924204616.189163849@suse.cz>

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

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)
Previous: pasky@suse.czNext: pasky@suse.cz
Message 7 of 20 in “git-gui: Remotes manipulation enhancements”
  1. 0/5 git-gui: Remotes manipulation enhancementspasky@suse.cz, Sep 24, 2008
  2. 1/5 git-gui: Clarify the Remote -> Delete... actionpasky@suse.cz, Sep 24, 2008
  3. 2/5 git-gui: Squash populate_{push,fetch}_menu to populate_remotes_menupasky@suse.cz, Sep 24, 2008
  4. 3/5 git-gui: Add support for adding remotespasky@suse.cz, Sep 24, 2008
  5. git-gui: Fix fetching from remotes when adding themPetr Baudis, Sep 24, 2008
  6. 4/5 git-gui: Add support for removing remotespasky@suse.cz, Sep 24, 2008
  7. Fix removing non-pushable remotesPetr Baudis, Sep 24, 2008
  8. 5/5 git-gui: mkdir -p when initializing new remote repositorypasky@suse.cz, Sep 24, 2008
  9. On Sponsor NoticesPetr Baudis, Sep 24, 2008
  10. Heikki OrsilaSep 24, 2008
  11. Martin LanghoffSep 24, 2008
  12. Petr BaudisSep 24, 2008
  13. Martin LanghoffSep 24, 2008
  14. Nicolas PitreSep 25, 2008
  15. Petr BaudisSep 25, 2008
  16. Nicolas PitreSep 25, 2008
  17. Petr BaudisSep 25, 2008
  18. Shawn O. PearceSep 25, 2008
  19. Andreas EricssonSep 25, 2008
  20. A.J. RossiniSep 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.