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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: diff: Allow 0 context, use GOT_DIFF_MAX_CONTEXT
To:
Klemens Nanni <kn@openbsd.org>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 29 Nov 2019 15:09:53 -0700

Download raw body.

Thread
On Fri, Nov 29, 2019 at 11:02:08PM +0100, Klemens Nanni wrote:
> OK?

ok
  
> diff e54952f1173d1a102a30a16c4405acced5d8bc4d 8b3a22cb03a4ef23aa3682b0928ead4574fd3aa3
> blob - 603a08dbce6fba185a792c4cb606fc4c9e482bce
> blob + 756eaa2ea3216dabe5aaf7080a2c652fdbfd0f74
> --- got/got.c
> +++ got/got.c
> @@ -2267,7 +2267,8 @@ cmd_diff(int argc, char *argv[])
>  	while ((ch = getopt(argc, argv, "C:r:sw")) != -1) {
>  		switch (ch) {
>  		case 'C':
> -			diff_context = strtonum(optarg, 1, INT_MAX, &errstr);
> +			diff_context = strtonum(optarg, 0, GOT_DIFF_MAX_CONTEXT,
> +			    &errstr);
>  			if (errstr != NULL)
>  				err(1, "-C option %s", errstr);
>  			break;
> 
>