Skip to content

Commit d08a189

Browse files
dgoudersgitster
authored andcommitted
MyFirstObjectWalk: use additional arg in config_fn_t
Commit a4e7e31 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3c2a3fd commit d08a189

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Documentation/MyFirstObjectWalk.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,14 @@ We'll also need to include the `config.h` header:
210210

211211
...
212212

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)
214215
{
215216
/*
216217
* For now, we don't have any custom configuration, so fall back to
217218
* the default config.
218219
*/
219-
return git_default_config(var, value, cb);
220+
return git_default_config(var, value, ctx, cb);
220221
}
221222
----
222223

@@ -389,10 +390,11 @@ modifying `rev_info.grep_filter`, which is a `struct grep_opt`.
389390
First some setup. Add `grep_config()` to `git_walken_config()`:
390391

391392
----
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)
393395
{
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);
396398
}
397399
----
398400

0 commit comments

Comments
 (0)