From: H.Merijn Brand Date: Fri, 03 Oct 2008 10:23:29 GMT Subject: Re: [PATCH] git-gui: Correctly set up locators in case of preset URL variable Message-ID: <20081003122329.432c6359@pc09.procura.nl> In-Reply-To: <1223028826-10306-1-git-send-email-pasky@suse.cz> On Fri, 3 Oct 2008 12:13:46 +0200, Petr Baudis wrote: > This patch fixes locators setup in case the URL variable is already set, > e.g. in the clone dialog during 'git gui clone'. While you are working on git-gui's transport.tcl, would you consider a user setting to set the default for pushing tags to remote repositories? After installation/update I always `fix' that by hand now. > Signed-off-by: Petr Baudis > > --- > 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 -- H.Merijn Brand Amsterdam Perl Mongers http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/