git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pat Thoyts <patthoyts@gmail.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: Pat Thoyts <patthoyts@googlemail.com>,
	git@vger.kernel.org, Jens Lehmann <jens.lehmann@web.de>
Subject: Re: [PATCH 1/2] git-gui: fix deleting item from all_remotes variable
Date: Sun, 13 Feb 2011 13:20:14 +0000	[thread overview]
Message-ID: <AANLkTi=hY1XpBNfhNDfM8kwgnitQXN-97mM-dkhCpTac@mail.gmail.com> (raw)
In-Reply-To: <20110212164344.GA19433@book.hvoigt.net>

On 12 February 2011 16:43, Heiko Voigt <hvoigt@hvoigt.net> wrote:
> lsearch and lreplace both take the variable content as argument and not
> just their name.
>
> Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
> ---
>  lib/remote.tcl |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/remote.tcl b/lib/remote.tcl
> index b92b429..1383e97 100644
> --- a/lib/remote.tcl
> +++ b/lib/remote.tcl
> @@ -264,8 +264,8 @@ proc remove_remote {name} {
>                unset repo_config(remote.$name.push)
>        }
>
> -       set i [lsearch -exact all_remotes $name]
> -       lreplace all_remotes $i $i
> +       set i [lsearch -exact $all_remotes $name]
> +       set all_remotes [lreplace $all_remotes $i $i]
>
>        set remote_m .mbar.remote
>        delete_from_menu $remote_m.fetch $name
> --
> 1.7.4.34.gd2cb1
>
>
This fix is good and clearly resolves a bug in the tcl code --
however, what does it actually fix in the application? It looks like
removing a remote works anyway even though this variable is not being
updated.
Pat Thoyts

  reply	other threads:[~2011-02-13 13:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-12 16:43 [PATCH 1/2] git-gui: fix deleting item from all_remotes variable Heiko Voigt
2011-02-13 13:20 ` Pat Thoyts [this message]
2011-02-13 13:47   ` Heiko Voigt
2011-02-13 13:50     ` [PATCH 1/2] git-gui: refactor remote submenu creation into subroutine Heiko Voigt
2011-02-13 13:57     ` [RFC PATCH 2/2] git-gui: teach fetch/prune menu to do it for all remotes Heiko Voigt
2011-02-14 13:03       ` [PATCH] git-gui: Include version check and test for tearoff menu entry Pat Thoyts
2011-02-14 21:31         ` Heiko Voigt
2011-02-15  0:31           ` Pat Thoyts
2011-02-17 20:06             ` Heiko Voigt
2011-02-22 18:36       ` [RFC PATCH 2/2] git-gui: teach fetch/prune menu to do it for all remotes Jens Lehmann
2011-02-22 19:28         ` [PATCH 1/2] git-gui: fetch/prune all entry only for more than one entry Heiko Voigt
2011-02-24  0:02           ` Pat Thoyts
2011-02-22 19:30         ` [PATCH 2/2] git-gui: fetch/prune all entry appears last Heiko Voigt
2011-02-23 19:19           ` Jens Lehmann
2011-02-24  0:09           ` Pat Thoyts
2011-02-13 14:05   ` Re: [PATCH 1/2] git-gui: fix deleting item from all_remotes variable Heiko Voigt
2011-02-13 14:15     ` Heiko Voigt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=hY1XpBNfhNDfM8kwgnitQXN-97mM-dkhCpTac@mail.gmail.com' \
    --to=patthoyts@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=jens.lehmann@web.de \
    --cc=patthoyts@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).