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

Re: [PATCH 1/1] remove parameter (prefix) from trace_repo_setup

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 15, 2023, 17:56 UTC
Message-ID
<xmqqh6vmzub3.fsf@gitster.g>
In-Reply-To
<20230215104246.8919-2-mcsm224@gmail.com>
Idriss Fekir <mcsm224@gmail.com> writes:
> From: idriss fekir <mcsm224@gmail.com>

This blank space is for you to explain why this is a good thing to do, which is missing here.

Show 8 quoted lines
> diff --git a/trace.c b/trace.c
> index 794a087c21..316070a43e 100644
> --- a/trace.c
> +++ b/trace.c
> @@ -292,9 +292,9 @@ static const char *quote_crnl(const char *path)
>  }
>  
>  /* FIXME: move prefix to startup_info struct and get rid of this arg */

I do not think this comment was meant as an instruction to BLINDLY remove the parameter and instead use from startup_info. Instead, the "FIX" in "FIXME" would involve that whoever does the fix checks the caller that reaches this function and makes sure that "prefix" value the caller passes exactly matches what is in the prefix member of the startup_info. Documenting that work should become a major part of the proposed log message. After doing that, this comment is no longer valid and needs to be removed.

> -void trace_repo_setup(const char *prefix)
> +void trace_repo_setup()
"void trace_repo_setup(void)"
> -void trace_repo_setup(const char *prefix);
> +void trace_repo_setup();
"void trace_repo_setup(void);"
Thanks.
Previous: Shuqi LiangNext: Idriss Fekir
Message 4 of 9 in “trace.c, git.c: removed unnecessary parameter to trace_repo_setup”
  1. 0/1 [gsoc][patch] trace.c, git.c: removed unnecessary parameter to trace_repo_setupIdriss Fekir, Feb 15, 2023
  2. 1/1 remove parameter (prefix) from trace_repo_setupIdriss Fekir, Feb 15, 2023
  3. Shuqi LiangFeb 15, 2023
  4. Junio C HamanoFeb 15, 2023
  5. 1/1 trace.c, git.c: remove unnecessary parameter to trace_repo_setupIdriss Fekir, Feb 15, 2023
  6. Christian CouderFeb 18, 2023
  7. 1/1 trace.c, git.c: remove unnecessary parameter to trace_repo_setup()Idriss Fekir, Feb 19, 2023
  8. Junio C HamanoFeb 21, 2023
  9. Idriss FekirFeb 22, 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.