[PATCH] git-gui: Correctly set up locators in case of preset URL variable

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Petr Baudis
Date: Friday, October 3, 2008 - 3:13 am

This patch fixes locators setup in case the URL variable is already set,
e.g. in the clone dialog during 'git gui clone'.

Signed-off-by: Petr Baudis <petr.baudis@novartis.com>

---
 git-gui/lib/transport.tcl |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
index 277e6b8..02c4eca 100644
--- a/git-gui/lib/transport.tcl
+++ b/git-gui/lib/transport.tcl
@@ -68,8 +68,13 @@ proc location_input {widget urlvar op} {
 
 	global _locator_template _locator_input _locator_var
 	trace remove variable _locator_input write locator_update
-	set _locator_template $default_locator
-	set _locator_input {}
+	if {[set $urlvar] == {}} {
+		set _locator_template $default_locator
+		set _locator_input {}
+	} else {
+		set _locator_template "URL"
+		set _locator_input [set $urlvar]
+	}
 	set _locator_var $urlvar
 	trace add variable _locator_input write locator_update
 
-- 
tg: (3c6c738..) t/git-gui/locator-preset (depends on: git-gui/locators t/git-gui/clonecmd)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] git-gui: Implement a 'clone' subcommand, Petr Baudis, (Tue Sep 30, 9:51 am)
Re: [PATCH] git-gui: Implement a 'clone' subcommand, Shawn O. Pearce, (Tue Sep 30, 12:53 pm)
Re: [PATCH] git-gui: Implement a 'clone' subcommand, Shawn O. Pearce, (Tue Sep 30, 12:58 pm)
[PATCH] git-gui: Correctly set up locators in case of pres ..., Petr Baudis, (Fri Oct 3, 3:13 am)
Re: [PATCH] git-gui: Implement a 'clone' subcommand, Petr Baudis, (Fri Oct 3, 3:17 am)