"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Raf Czlonka <rczlonka@gmail.com>
Subject:
Re: Fix hang in regress
To:
Tracey Emery <tracey@traceyemery.net>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 16 Jun 2021 02:29:15 +0100

Download raw body.

Thread
On Tue, Jun 15, 2021 at 11:22:17PM BST, Tracey Emery wrote:
> Hi,
> 
> I believe in most environments, VISUAL is checked before EDITOR, so, if
> someone has this set, the test_commit_prepared_logmsg test will hang,
> waiting for input in the background.

Hi Tracey,

If this is anything to go by - 'got/got.c':

	editor = getenv("VISUAL");
	if (editor == NULL)
		editor = getenv("EDITOR");

then yes.

FWIW, personally, I use this order everywhere:

	${VISUAL:-${EDITOR:-vi}}

Also, 'histedit' regress test already uses VISUAL:

	VISUAL="$testroot/editor.sh" got histedit -f > $testroot/stdout)

Regards,

Raf

> 
> This fixes my hang. ok?
> 
> -- 
> 
> Tracey Emery
> 
> diff 991ff1aa4f423a1faea1bae0e85a913a88038309 /home/tracey/src/got
> blob - 3956dc0289b56e9ce806eab6702d0522b243de79
> file + regress/cmdline/commit.sh
> --- regress/cmdline/commit.sh
> +++ regress/cmdline/commit.sh
> @@ -1380,7 +1380,7 @@ sed -i 's/foo/bar/' "\$1"
>  EOF
>  	chmod +x $testroot/editor.sh
>  
> -	(cd $testroot/wt && env EDITOR="$testroot/editor.sh" \
> +	(cd $testroot/wt && env VISUAL="$testroot/editor.sh" \
>  		got commit -F "$testroot/logmsg" > $testroot/stdout)
>  
>  	local head_rev=`git_show_head $testroot/repo`
>