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

From:
Mark Jamsek <mark@jamsek.com>
Subject:
Re: gotwebd: drop unused parameter from got_get_repo_{owner,age}
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 22 Nov 2022 22:45:30 +1100

Download raw body.

Thread
On 22-11-22 12:06PM, Omar Polo wrote:
> Extracted from a previous pending diff for ease of reading.

ok

I thought I'd mention: I don't seem to have commit ee2f63eb in my tree;
the diff applied but with an offset for gotwebd/gotweb.c

> -----------------------------------------------
> commit 39afa5819b25cb2a5a8411de6f16d1e5667bb2c7
> from: Omar Polo <op@omarpolo.com>
> date: Tue Nov 22 11:00:49 2022 UTC
>  
>  gotwebd: drop unused path parameter from got_get_repo_{owner,age}
>  
> diff ee2f63eba45d621e2387fe7297d27dec9290a4e8 39afa5819b25cb2a5a8411de6f16d1e5667bb2c7
> commit - ee2f63eba45d621e2387fe7297d27dec9290a4e8
> commit + 39afa5819b25cb2a5a8411de6f16d1e5667bb2c7
> blob - b5a140ba22d460fe720b01f0db1a2c26b2d0661f
> blob + 50fee3056b1e5f7a9bc78f255201d8b1539a2995
> --- gotwebd/got_operations.c
> +++ gotwebd/got_operations.c
> @@ -108,7 +108,7 @@ got_get_repo_owner(char **owner, struct request *c, ch
>  }
>  
>  const struct got_error *
> -got_get_repo_owner(char **owner, struct request *c, char *dir)
> +got_get_repo_owner(char **owner, struct request *c)
>  {
>  	struct server *srv = c->srv;
>  	struct transport *t = c->t;
> @@ -134,7 +134,7 @@ got_get_repo_age(char **repo_age, struct request *c, c
>  }
>  
>  const struct got_error *
> -got_get_repo_age(char **repo_age, struct request *c, char *dir,
> +got_get_repo_age(char **repo_age, struct request *c,
>      const char *refname, int ref_tm)
>  {
>  	const struct got_error *error = NULL;
> blob - 09d8f166fab40a704104d07aaa4c8e0564295c66
> blob + 87aa73baf749f6c131882947826effd5278c6c05
> --- gotwebd/gotweb.c
> +++ gotwebd/gotweb.c
> @@ -1545,8 +1545,7 @@ gotweb_render_branches(struct request *c)
>  		if (strncmp(refname, "refs/heads/", 11) != 0)
>  			continue;
>  
> -		error = got_get_repo_age(&age, c, qs->path, refname,
> -		    TM_DIFF);
> +		error = got_get_repo_age(&age, c, refname, TM_DIFF);
>  		if (error)
>  			goto done;
>  
> @@ -2431,7 +2430,6 @@ done:
>  		goto err;
>  	}
>  
> -
>  	repo = find_cached_repo(srv, repo_dir->path);
>  	if (repo == NULL) {
>  		error = cache_repo(&repo, srv, repo_dir, sock);
> @@ -2443,11 +2441,10 @@ done:
>  	    repo_dir->path);
>  	if (error)
>  		goto err;
> -	error = got_get_repo_owner(&repo_dir->owner, c, repo_dir->path);
> +	error = got_get_repo_owner(&repo_dir->owner, c);
>  	if (error)
>  		goto err;
> -	error = got_get_repo_age(&repo_dir->age, c, repo_dir->path,
> -	    NULL, TM_DIFF);
> +	error = got_get_repo_age(&repo_dir->age, c, NULL, TM_DIFF);
>  	if (error)
>  		goto err;
>  	error = gotweb_get_clone_url(&repo_dir->url, srv, repo_dir->path);
> blob - a8a55276acbd0b209205938c75b88d6918b1c6b8
> blob + 0a9217f7fb5cc2256686d1d01c59b69e5f96d4ad
> --- gotwebd/gotwebd.h
> +++ gotwebd/gotwebd.h
> @@ -455,8 +455,8 @@ const struct got_error *got_get_repo_owner(char **, st
>  int fcgi_gen_binary_response(struct request *, const uint8_t *, int);
>  
>  /* got_operations.c */
> -const struct got_error *got_get_repo_owner(char **, struct request *, char *);
> -const struct got_error *got_get_repo_age(char **, struct request *, char *,
> +const struct got_error *got_get_repo_owner(char **, struct request *);
> +const struct got_error *got_get_repo_age(char **, struct request *,
>      const char *, int);
>  const struct got_error *got_get_repo_commits(struct request *, int);
>  const struct got_error *got_get_repo_tags(struct request *, int);
> 

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