All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] git-gui: fix deleting item from all_remotes variable
@ 2011-02-12 16:43 Heiko Voigt
  2011-02-13 13:20 ` Pat Thoyts
  0 siblings, 1 reply; 17+ messages in thread
From: Heiko Voigt @ 2011-02-12 16:43 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Jens Lehmann

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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-02-24  0:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.