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

Re: [PATCH 1/4] trace2: fix signature of trace2_def_param() macro

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 23, 2023, 06:10 UTC
Message-ID
<xmqqil5tatl3.fsf@gitster.g>
In-Reply-To
<97d17c22ff310c26c3ec391c7bf870e7e5bab4f8.1700680717.git.gitgitgadget@gmail.com>
"Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 25 quoted lines
> From: Jeff Hostetler <jeffhostetler@github.com>
>
> Add `struct key_value_info` argument to `trace2_def_param()`.
>
> In dc90208497 (trace2: plumb config kvi, 2023-06-28) a `kvi`
> argument was added to `trace2_def_param_fl()` but the macro
> was not up updated. Let's fix that.
>
> Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
> ---
>  trace2.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/trace2.h b/trace2.h
> index 40d8c2e02a5..1f0669bbd2d 100644
> --- a/trace2.h
> +++ b/trace2.h
> @@ -337,8 +337,8 @@ struct key_value_info;
>  void trace2_def_param_fl(const char *file, int line, const char *param,
>  			 const char *value, const struct key_value_info *kvi);
>  
> -#define trace2_def_param(param, value) \
> -	trace2_def_param_fl(__FILE__, __LINE__, (param), (value))
> +#define trace2_def_param(param, value, kvi) \
> +	trace2_def_param_fl(__FILE__, __LINE__, (param), (value), (kvi))

IOW, this macro was not used back when it was updated, and nobody used it since then?

I briefly wondered if we are better off removing it but that does not make sense because you are adding a new (and only) user to it.

Will queue.  Thanks.
>  
>  /*
>   * Tell trace2 about a newly instantiated repo object and assign
Previous: Jeff Hostetler via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 3 of 9 in “Redact unsafe URLs in the Trace2 output”
  1. 0/4 Redact unsafe URLs in the Trace2 outputJohannes Schindelin via GitGitGadget, Nov 22, 2023
  2. 1/4 trace2: fix signature of trace2_def_param() macroJeff Hostetler via GitGitGadget, Nov 22, 2023
  3. Junio C HamanoNov 23, 2023
  4. 2/4 trace2: redact passwords from https:// URLs by defaultJohannes Schindelin via GitGitGadget, Nov 22, 2023
  5. Elijah NewrenNov 23, 2023
  6. Jeff KingNov 27, 2023
  7. 3/4 t0211: test URL redacting in PERF formatJeff Hostetler via GitGitGadget, Nov 22, 2023
  8. 4/4 t0212: test URL redacting in EVENT formatJeff Hostetler via GitGitGadget, Nov 22, 2023
  9. Elijah NewrenNov 23, 2023

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.