From: James Cook Subject: Re: gitconfig: fix read/write out of bound To: Omar Polo , Stefan Sperling Cc: gameoftrees@openbsd.org Date: Mon, 20 Feb 2023 18:22:44 +0000 Omar Polo writes: > On 2023/02/19 10:19:41 +0100, Stefan Sperling 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 " \ >> >> 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