Re: [PATCH] Fix bug when more than one readline instance is used

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

 



Wesley Schwengle <wesleys@xxxxxxxxxxxxxxx> writes:

If I recall correctly, this was fixed by Peff yesterday?  

https://lore.kernel.org/git/20230808181531.GB2097200@xxxxxxxxxxxxxxxxxxxxxxx/

> diff --git a/git-send-email.perl b/git-send-email.perl
> index affbb88509..7fdcf9084a 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -971,8 +971,10 @@ sub get_patch_subject {
>  	do_edit(@files);
>  }
>  
> +my $term;
>  sub term {
> -	my $term = eval {
> +	return $term if $term;
> +	$term = eval {
>  		require Term::ReadLine;
>  		$ENV{"GIT_SEND_EMAIL_NOTTY"}
>  			? Term::ReadLine->new('git-send-email', \*STDIN, \*STDOUT)

The patch I queued yesterday wraps this lexical inside another block
to hide it from the outside, but otherwise it should achieve the
same goal.



[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]

  Powered by Linux