Message ID | 0eeb4b78ac91c2bddf775fdea34ce5c0515ff205.1711368499.git.dirk@gouders.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Fixes for Documentation/MyFirstObjectWalk.txt | expand |
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. > 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); > } > ----
Junio C Hamano <gitster@pobox.com> writes: > 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. Yes, thanks, will do. (This means I read SubmittingPatches too fast and have to re-read it to see if I missed more details.) Dirk
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); } ----
Commit a4e7e317 (config: add ctx arg to config_fn_t) 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> --- Documentation/MyFirstObjectWalk.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)