git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
May 2, 2016, 17:03 UTC
Message-ID
<57278877.50907@ramsayjones.plus.com>
In-Reply-To
<20160502142813.50868-2-gitter.spiros@gmail.com>
On 02/05/16 15:28, Elia Pinto wrote:
[snip]
Show 11 quoted lines
> 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

Previous: Elia PintoNext: Jeff King
Message 3 of 9 in “[PATCHv5 0/2] Implement the GIT_TRACE_CURL environment variable”
  1. Elia PintoMay 2, 2016
  2. 1/2 http.c: implement the GIT_TRACE_CURL environment variableElia Pinto, May 2, 2016
  3. Ramsay JonesMay 2, 2016
  4. Jeff KingMay 2, 2016
  5. Junio C HamanoMay 2, 2016
  6. Jeff KingMay 2, 2016
  7. Junio C HamanoMay 2, 2016
  8. 2/2 imap-send.c: introduce the GIT_TRACE_CURL environment variableElia Pinto, May 2, 2016
  9. Jeff KingMay 2, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.