Code

git-gui: fix deleting item from all_remotes variable
authorHeiko Voigt <hvoigt@hvoigt.net>
Sat, 12 Feb 2011 16:43:44 +0000 (17:43 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Sun, 13 Feb 2011 00:47:19 +0000 (00:47 +0000)
lsearch and lreplace both take the variable content as argument and not
just their name.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/remote.tcl

index b92b429cf766d525402047175ed0a69af015c682..1383e9786ce76de16d6fcf9f427f685fb9bad927 100644 (file)
@@ -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