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

[RFC PATCH 2/8] git gui: teach delete dialog to open with a default remote

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Sep 21, 2009, 13:06 UTC
Message-ID
<711bc3257266372b0a0f01ac335fa95be7def077.1253481338.git.hvoigt@hvoigt.net>
In-Reply-To
<f52bb968bf977dbbed78ce48856cd41d0add708f.1253481338.git.hvoigt@hvoigt.net>
This is useful if you want to open the delete dialog with a preselected
remote. We use this in the next patch from this series.
---
 git-gui/lib/remote_branch_delete.tcl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-gui/lib/remote_branch_delete.tcl b/git-gui/lib/remote_branch_delete.tcl
index 2416420..e0dbc25 100644
--- a/git-gui/lib/remote_branch_delete.tcl
+++ b/git-gui/lib/remote_branch_delete.tcl
@@ -22,7 +22,7 @@ field head_cache
 field full_cache
 field cached
 
-constructor dialog {} {
+constructor dialog {{initial_remote origin}} {
 	global all_remotes M1B
 
 	make_toplevel top w
@@ -52,8 +52,8 @@ constructor dialog {} {
 			-variable @urltype
 		eval tk_optionMenu $w.dest.remote_m @remote $all_remotes
 		grid $w.dest.remote_r $w.dest.remote_m -sticky w
-		if {[lsearch -sorted -exact $all_remotes origin] != -1} {
-			set remote origin
+		if {[lsearch -sorted -exact $all_remotes $initial_remote] != -1} {
+			set remote $initial_remote
 		} else {
 			set remote [lindex $all_remotes 0]
 		}
-- 
1.6.5.rc1.12.gc72fe
Previous: Heiko VoigtNext: Heiko Voigt
Message 3 of 9 in “Extend git gui for better "centralized" workflow integration”
  1. 0/8 Extend git gui for better "centralized" workflow integrationHeiko Voigt, Sep 21, 2009
  2. 1/8 git gui: add a "compose review email" checkbox to push dialogHeiko Voigt, Sep 21, 2009
  3. 2/8 git gui: teach delete dialog to open with a default remoteHeiko Voigt, Sep 21, 2009
  4. 3/8 git gui: add checkbox to launch remote branch delete after pushHeiko Voigt, Sep 21, 2009
  5. 4/8 git gui: teach fetch operation to close dialog on successful completionHeiko Voigt, Sep 21, 2009
  6. 5/8 git gui: do fetch from a default remote on startupHeiko Voigt, Sep 21, 2009
  7. 6/8 git gui: add "review topic" menuitem which supports feature branch workflowHeiko Voigt, Sep 21, 2009
  8. 7/8 Add documentation for git gui variables for email and delete after pushHeiko Voigt, Sep 21, 2009
  9. 8/8 git gui: make gc hint and fetch on startup sequentialHeiko Voigt, Sep 21, 2009

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.