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

Re: [PATCH v3 1/5] MyFirstObjectWalk: use additional arg in config_fn_t

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2024, 17:16 UTC
Message-ID
<xmqqcyrimdtx.fsf@gitster.g>
In-Reply-To
<0eeb4b78ac91c2bddf775fdea34ce5c0515ff205.1711368499.git.dirk@gouders.net>
Dirk Gouders <dirk@gouders.net> writes:
> Commit a4e7e317 (config: add ctx arg to config_fn_t) added a fourth

In your next topic, use "git show -s --pretty=reference a4e7e317" to show "a4e7e317f8 (config: add ctx arg to config_fn_t, 2023-06-28)" with dates. It makes it easier to see how long what is being fixed is broken, giving reviewers a sense of urgency for a fix. It is not necessary to reroll this commit only to update the reference, though.

Show 46 quoted lines
> argument to config_fn_t but did not change relevant function calls
> in Documentation/MyFirstObjectWalk.txt.
>
> Fix those calls and the example git_walken_config() to use
> that additional argument.
>
> Signed-off-by: Dirk Gouders <dirk@gouders.net>
> ---
>  Documentation/MyFirstObjectWalk.txt | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
> index c68cdb11b9..cceac2df95 100644
> --- a/Documentation/MyFirstObjectWalk.txt
> +++ b/Documentation/MyFirstObjectWalk.txt
> @@ -210,13 +210,14 @@ We'll also need to include the `config.h` header:
>  
>  ...
>  
> -static int git_walken_config(const char *var, const char *value, void *cb)
> +static int git_walken_config(const char *var, const char *value,
> +			     const struct config_context *ctx, void *cb)
>  {
>  	/*
>  	 * For now, we don't have any custom configuration, so fall back to
>  	 * the default config.
>  	 */
> -	return git_default_config(var, value, cb);
> +	return git_default_config(var, value, ctx, cb);
>  }
>  ----
>  
> @@ -389,10 +390,11 @@ modifying `rev_info.grep_filter`, which is a `struct grep_opt`.
>  First some setup. Add `grep_config()` to `git_walken_config()`:
>  
>  ----
> -static int git_walken_config(const char *var, const char *value, void *cb)
> +static int git_walken_config(const char *var, const char *value,
> +			     const struct config_context *ctx, void *cb)
>  {
> -	grep_config(var, value, cb);
> -	return git_default_config(var, value, cb);
> +	grep_config(var, value, ctx, cb);
> +	return git_default_config(var, value, ctx, cb);
>  }
>  ----
Previous: Dirk GoudersNext: Dirk Gouders
Message 25 of 49 in “Fixes for Documentation/MyFirstObjectWalk.txt”
  1. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 19, 2024
  2. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 19, 2024
  3. Kyle LippincottMar 23, 2024
  4. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 19, 2024
  5. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 19, 2024
  6. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 19, 2024
  7. Kyle LippincottMar 23, 2024
  8. Dirk GoudersMar 23, 2024
  9. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 19, 2024
  10. Kyle LippincottMar 23, 2024
  11. Dirk GoudersMar 23, 2024
  12. Kyle LippincottMar 23, 2024
  13. Dirk GoudersMar 23, 2024
  14. Junio C HamanoMar 24, 2024
  15. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 25, 2024
  16. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 25, 2024
  17. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 25, 2024
  18. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 25, 2024
  19. Junio C HamanoMar 25, 2024
  20. Dirk GoudersMar 25, 2024
  21. Junio C HamanoMar 25, 2024
  22. Kyle LippincottMar 25, 2024
  23. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 25, 2024
  24. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 25, 2024
  25. Junio C HamanoMar 25, 2024
  26. Dirk GoudersMar 25, 2024
  27. Kyle LippincottMar 25, 2024
  28. Dirk GoudersMar 25, 2024
  29. Junio C HamanoMar 25, 2024
  30. Kyle LippincottMar 25, 2024
  31. Dirk GoudersMar 25, 2024
  32. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 26, 2024
  33. Kyle LippincottMar 27, 2024
  34. Dirk GoudersMar 27, 2024
  35. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 27, 2024
  36. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 27, 2024
  37. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 27, 2024
  38. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 27, 2024
  39. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 27, 2024
  40. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 27, 2024
  41. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 26, 2024
  42. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 26, 2024
  43. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 26, 2024
  44. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 26, 2024
  45. Junio C HamanoMar 26, 2024
  46. Dirk GoudersMar 26, 2024
  47. Junio C HamanoMar 26, 2024
  48. Dirk GoudersMar 27, 2024
  49. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 26, 2024

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.