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

From:
James Cook <falsifian@falsifian.org>
Subject:
Re: gitconfig: fix read/write out of bound
To:
Omar Polo <op@omarpolo.com>, Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 20 Feb 2023 18:22:44 +0000

Download raw body.

Thread
Omar Polo <op@omarpolo.com> writes:
> On 2023/02/19 10:19:41 +0100, Stefan Sperling <stsp@stsp.name> wrote:
>> On Sat, Feb 18, 2023 at 06:47:21PM +0100, Omar Polo wrote:
>> > +	(cd "$testroot/repo" && got log -l1 | grep ^from: > $testroot/stdout)
>> > +	ret=$?
>> > +	if [ $ret -ne 0 ]; then
>> > +		test_done "$testroot" "$ret"
>> > +		return 1
>> > +	fi
>> > +
>> > +	echo "from: Flank Luck <flan_luck@openbsd.org>" \
>> 
>> Who is Flank?
>
> woops :)
>
>> > +		> $testroot/stdout.expectd
>                                    ^^^^^^^
>
> due to this typo it was using the previous stdout.expected and so
> haven't spotted the issue.  Fixed both, thanks!
>
>> > +	cmp -s $testroot/stdout.expected $testroot/stdout
>> > +	ret=$?
>> > +	if [ $ret -ne 0 ]; then
>> > +		diff -u $testroot/stdout.expected $testroot/stdout
>> > +	fi
>> >  	test_done "$testroot" "$ret"
>> >  }

Thanks, that fixes the problem.

got still emits a "syntax error" warning if my ~/.gitconfig has a
comment line with whitespace before the initial #, but it seems to be
harmless. Example .gitconfig triggering the error message:

[user]
	#comment
	name = James Cook
	email = falsifian@falsifian.org

-- 
James