Re: [PATCH 1/2] git-gui: fix deleting item from all_remotes variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 February 2011 16:43, Heiko Voigt <hvoigt@xxxxxxxxxx> wrote:
> lsearch and lreplace both take the variable content as argument and not
> just their name.
>
> Signed-off-by: Heiko Voigt <heiko.voigt@xxxxxxx>
> ---
> Â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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]