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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: regress for tog log limit and search
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 1 Sep 2023 13:30:50 +0200

Download raw body.

Thread
On Wed, Aug 30, 2023 at 01:03:13AM +1000, Mark Jamsek wrote:
> +	got checkout "$repo" "$wt" > /dev/null
> +	ret=$?
> +	if [ $ret -ne 0 ]; then
> +		echo "got checkout failed unexpectedly"
> +		test_done "$testroot" "$ret"
> +		return 1
> +	fi
> +
> +	cd "$wt"  # test is in a subshell

Shouldn't this way "subdirectory"?
A subshell would be imply the (cd foo && bar) construct, would it not?

Maybe just drop this comment?

> +test_log_search()
> +{
> +	test_init log_search 80 8
> +	local repo="$testroot/repo"
> +	local wt="$testroot/wt"
> +	local id=$(git_show_head "$repo")
> +
> +	set -- "$id"
> +
> +	got checkout "$repo" "$wt" > /dev/null
> +	ret=$?
> +	if [ $ret -ne 0 ]; then
> +		echo "got checkout failed unexpectedly"
> +		test_done "$testroot" "$ret"
> +		return 1
> +	fi
> +
> +	cd "$wt"  # subshell

Same here.

No other issues spotted while reading through. ok.