Subject: Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

From: Ramsay Jones <[email-masked]>
Date: Mon, 2 May 2016 18:03:51 +0100

On 02/05/16 15:28, Elia Pinto wrote:

[snip]

> diff --git a/http.h b/http.h
> index 36f558b..cd186a4 100644
> --- a/http.h
> +++ b/http.h
> @@ -225,4 +225,8 @@ extern int finish_http_object_request(struct http_object_request *freq);
>  extern void abort_http_object_request(struct http_object_request *freq);
>  extern void release_http_object_request(struct http_object_request *freq);
>  
> +/* Debug callback and setup routine for curl_easy_setopt CURLOPT_DEBUGFUNCTION */
> +void setup_curl_trace(CURL *handle);
> +int curl_trace(CURL *handle, curl_infotype type, char *data, size_t size, void *userp);

Given that you have wrapped the use of the debug callback into the
setup_curl_trace() routine (good), do you still need to export the
curl_trace() function?

I would make that static, so that only setup_curl_trace() needs to
be a public symbol. (I would also re-order the function definitions,
so that setup_curl_trace() comes after curl_trace(), but that is a
minor point).

ATB,
Ramsay Jones