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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd diff is too slow
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 14 Jun 2023 11:35:55 +0200

Download raw body.

Thread
On Wed, Jun 14, 2023 at 11:08:38AM +0200, Omar Polo wrote:
> also done.  I did these last two in this diff and not in the previous
> commit since it wouldn't make sense if `limit' is an int.
> 
> if ok i'll try to apply the same treatment to the tags case.

Yes, this is fine.

>  		| MAX_COMMITS_DISPLAY NUMBER {
> -			if ($2 > 0)
> -				new_srv->max_commits_display = $2;
> +			if ($2 <= 1) {
> +				yyerror("invalid max_commits_display %lld",
> +				    $2);
> +				YYERROR;
> +			}

We should tell users what the valid range is.
In the error message, in the man page, or both.

> +			new_srv->max_commits_display = $2;
>  		}
>  		;
>  
>