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

From:
Mark Jamsek <mark@jamsek.com>
Subject:
Re: regress for tog log limit and search
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 05 Sep 2023 21:28:44 +1000

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> wrote:
> 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.

Thanks, stsp!

Sorry for the late reply (spare time is at a premium for the moment;
I'm really looking forward to summer!) but I've committed this now.

wrt the subshell comments: I meant "subshell" not "subdir"--it was a
remnder the test is run in a subshell so moving into the directory is
fine (I kept doing the (cd $wt && ...)). But I've dropped them both.

-- 
Mark Jamsek <https://bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68