MyFirstObjectWalk: use additional arg in config_fn_t

Commit a4e7e317f8 (config: add ctx arg to config_fn_t, 2023-06-28) added a fourth 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Dirk Gouders committed Mar 27, 2024 at 12:22 UTC d08a189ce29285b3618b65bbeae5b3780d8c0621
1 file changed +7 -5
Documentation/MyFirstObjectWalk.txt
+7 -5
@@ -210,13 +210,14 @@ We'll also need to include the `config.h` header:
210
211 ...
212
213 -static int git_walken_config(const char *var, const char *value, void *cb)
213 +static int git_walken_config(const char *var, const char *value,
214 + const struct config_context *ctx, void *cb)
215 {
216 /*
217 * For now, we don't have any custom configuration, so fall back to
218 * the default config.
219 */
219 - return git_default_config(var, value, cb);
220 + return git_default_config(var, value, ctx, cb);
221 }
222 ----
223
@@ -389,10 +390,11 @@ modifying `rev_info.grep_filter`, which is a `struct grep_opt`.
390 First some setup. Add `grep_config()` to `git_walken_config()`:
391
392 ----
392 -static int git_walken_config(const char *var, const char *value, void *cb)
393 +static int git_walken_config(const char *var, const char *value,
394 + const struct config_context *ctx, void *cb)
395 {
394 - grep_config(var, value, cb);
395 - return git_default_config(var, value, cb);
396 + grep_config(var, value, ctx, cb);
397 + return git_default_config(var, value, ctx, cb);
398 }
399 ----
400