{"thread":{"id":"63546","subject":"[GSoC PATCH 0/2] Update MyFirstObjectWalk with struct repository and meson","startedAt":"2025-05-29T19:20:56Z","lastAt":"2025-06-03T06:08:46Z","messageCount":11,"participants":["Lucas Seiki Oshiro","Karthik Nayak","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"519169","messageId":"20250529192036.75408-1-lucasseikioshiro@gmail.com","threadId":"63546","inReplyTo":null,"subject":"[GSoC PATCH 0/2] Update MyFirstObjectWalk with struct repository and meson","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-05-29T19:20:34Z","receivedAt":"2025-05-29T19:20:56Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Hi!\n\nI was studying for GSoC using this documentation, but I found out that two\nthings were outdated:\n\n1. The lack of using the `struct repository *repo*` parameter in some functions;\n2. There were a instruction for adding the new command to the Makefile, but\nthere are no mentions to Meson.\n\nThis patchset updates this documentation file, and hopefully will help future\nnew contributors.\n\nLucas Seiki Oshiro (2):\n  MyFirstContribution: use struct repository in examples\n  MyFirstContribution: add walken.c to meson.build\n\n Documentation/MyFirstObjectWalk.adoc | 27 +++++++++++++++++----------\n 1 file changed, 17 insertions(+), 10 deletions(-)\n\n-- \n2.39.5 (Apple Git-154)\n\n"},{"id":"519170","messageId":"20250529192036.75408-2-lucasseikioshiro@gmail.com","threadId":"63546","inReplyTo":"20250529192036.75408-1-lucasseikioshiro@gmail.com","subject":"[GSoC PATCH 1/2] MyFirstContribution: use struct repository in examples","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-05-29T19:20:35Z","receivedAt":"2025-05-29T19:21:00Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Add the parameter `struct repository *repo` to the cmd_walken function.\n\nSince commit 9b1cb50, all the cmd_* have the `repo` parameter and new\ncommands must follow this convention, so the documentation should also\nbe changed.\n\nAlso change the `git_config` calls to `repo_config`, also passing the\n`repo` parameter.\n\nSigned-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n---\n Documentation/MyFirstObjectWalk.adoc | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\nindex f03753dfc0..29d26abb47 100644\n--- a/Documentation/MyFirstObjectWalk.adoc\n+++ b/Documentation/MyFirstObjectWalk.adoc\n@@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:\n #include \"builtin.h\"\n #include \"trace.h\"\n \n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \ttrace_printf(_(\"cmd_walken incoming...\\n\"));\n \treturn 0;\n@@ -86,7 +86,7 @@ int cmd_walken(int argc, const char **argv, const char *prefix)\n Also add the relevant line in `builtin.h` near `cmd_version()`:\n \n ----\n-int cmd_walken(int argc, const char **argv, const char *prefix);\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);\n ----\n \n Include the command in `git.c` in `commands[]` near the entry for `version`,\n@@ -193,7 +193,7 @@ initialization functions.\n \n Next, we should have a look at any relevant configuration settings (i.e.,\n settings readable and settable from `git config`). This is done by providing a\n-callback to `git_config()`; within that callback, you can also invoke methods\n+callback to `repo_config()`; within that callback, you can also invoke methods\n from other components you may need that need to intercept these options. Your\n callback will be invoked once per each configuration value which Git knows about\n (global, local, worktree, etc.).\n@@ -221,14 +221,14 @@ static int git_walken_config(const char *var, const char *value,\n }\n ----\n \n-Make sure to invoke `git_config()` with it in your `cmd_walken()`:\n+Make sure to invoke `repo_config()` with it in your `cmd_walken()`:\n \n ----\n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \t...\n \n-\tgit_config(git_walken_config, NULL);\n+\trepo_config(repo, git_walken_config, NULL);\n \n \t...\n }\n@@ -250,14 +250,14 @@ We'll also need to include the `revision.h` header:\n \n ...\n \n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \t/* This can go wherever you like in your declarations.*/\n \tstruct rev_info rev;\n \t...\n \n \t/* This should go after the git_config() call. */\n-\trepo_init_revisions(the_repository, &rev, prefix);\n+\trepo_init_revisions(repo, the_repository, &rev, prefix);\n \n \t...\n }\n@@ -305,7 +305,7 @@ Then let's invoke `final_rev_info_setup()` after the call to\n `repo_init_revisions()`:\n \n ----\n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \t...\n \n-- \n2.39.5 (Apple Git-154)\n\n"},{"id":"519171","messageId":"20250529192036.75408-3-lucasseikioshiro@gmail.com","threadId":"63546","inReplyTo":"20250529192036.75408-1-lucasseikioshiro@gmail.com","subject":"[GSoC PATCH 2/2] MyFirstContribution: add walken.c to meson.build","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-05-29T19:20:36Z","receivedAt":"2025-05-29T19:21:02Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Instruct in the documentation to also add an entry in meson.build for\nbuiltin/walken.c, as currently both Meson and Make are supported.\n\nSigned-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n---\n Documentation/MyFirstObjectWalk.adoc | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\nindex 29d26abb47..3b66e48dd9 100644\n--- a/Documentation/MyFirstObjectWalk.adoc\n+++ b/Documentation/MyFirstObjectWalk.adoc\n@@ -96,12 +96,19 @@ maintaining alphabetical ordering:\n { \"walken\", cmd_walken, RUN_SETUP },\n ----\n \n-Add it to the `Makefile` near the line for `builtin/worktree.o`:\n+Add an entry for the new command in the file of our two build systems (Make\n+and Meson) before the entry for `worktree`:\n \n+- In the `Makefile`:\n ----\n BUILTIN_OBJS += builtin/walken.o\n ----\n \n+- In the `meson.build` file:\n+----\n+  'builtin/walken.c',\n+----\n+\n Build and test out your command, without forgetting to ensure the `DEVELOPER`\n flag is set, and with `GIT_TRACE` enabled so the debug output can be seen:\n \n-- \n2.39.5 (Apple Git-154)\n\n"},{"id":"519172","messageId":"CAOLa=ZThmqVf5u4QOZuQa-cFVtke6H01iw8bbPx_0eTxVdFZRA@mail.gmail.com","threadId":"63546","inReplyTo":"20250529192036.75408-2-lucasseikioshiro@gmail.com","subject":"Re: [GSoC PATCH 1/2] MyFirstContribution: use struct repository in examples","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2025-05-29T19:57:26Z","receivedAt":"2025-05-29T19:57:28Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:\n\n> Add the parameter `struct repository *repo` to the cmd_walken function.\n>\n> Since commit 9b1cb50, all the cmd_* have the `repo` parameter and new\n\nWhen referencing commits, we stick to a particular format. From\n'Documentation/SubmittingPatches', we have:\n\n  When you reference a commit on a more stable branch (like `master`,\n  `maint` and `next`), use the format \"abbreviated hash (subject,\n  date)\", like this:\n\n  ....\n  \tCommit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)\n  \tnoticed that ...\n  ....\n\nThe document also states that `git show -s --pretty=reference <commit>`\ncan be used to obtain this format.\n\n> commands must follow this convention, so the documentation should also\n> be changed.\n>\n> Also change the `git_config` calls to `repo_config`, also passing the\n> `repo` parameter.\n\nNit: Okay this makes sense, but It would be nice, if you also elaborate\na bit here, about why you want to make that change. The context being\nthat since 036876a106 (config: hide functions using `the_repository` by\ndefault, 2024-08-13) the non-repo config functions are no longer\nrecommended as they use the global 'repository' variable.\n\n>\n> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n> ---\n>  Documentation/MyFirstObjectWalk.adoc | 18 +++++++++---------\n>  1 file changed, 9 insertions(+), 9 deletions(-)\n>\n> diff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\n> index f03753dfc0..29d26abb47 100644\n> --- a/Documentation/MyFirstObjectWalk.adoc\n> +++ b/Documentation/MyFirstObjectWalk.adoc\n> @@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:\n>  #include \"builtin.h\"\n>  #include \"trace.h\"\n>\n> -int cmd_walken(int argc, const char **argv, const char *prefix)\n> +int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n>  {\n>  \ttrace_printf(_(\"cmd_walken incoming...\\n\"));\n>  \treturn 0;\n> @@ -86,7 +86,7 @@ int cmd_walken(int argc, const char **argv, const char *prefix)\n>  Also add the relevant line in `builtin.h` near `cmd_version()`:\n>\n>  ----\n> -int cmd_walken(int argc, const char **argv, const char *prefix);\n> +int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);\n>  ----\n>\n>  Include the command in `git.c` in `commands[]` near the entry for `version`,\n> @@ -193,7 +193,7 @@ initialization functions.\n>\n>  Next, we should have a look at any relevant configuration settings (i.e.,\n>  settings readable and settable from `git config`). This is done by providing a\n> -callback to `git_config()`; within that callback, you can also invoke methods\n> +callback to `repo_config()`; within that callback, you can also invoke methods\n>  from other components you may need that need to intercept these options. Your\n>  callback will be invoked once per each configuration value which Git knows about\n>  (global, local, worktree, etc.).\n> @@ -221,14 +221,14 @@ static int git_walken_config(const char *var, const char *value,\n>  }\n>  ----\n>\n> -Make sure to invoke `git_config()` with it in your `cmd_walken()`:\n> +Make sure to invoke `repo_config()` with it in your `cmd_walken()`:\n>\n>  ----\n> -int cmd_walken(int argc, const char **argv, const char *prefix)\n> +int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n>  {\n>  \t...\n>\n> -\tgit_config(git_walken_config, NULL);\n> +\trepo_config(repo, git_walken_config, NULL);\n>\n>  \t...\n>  }\n> @@ -250,14 +250,14 @@ We'll also need to include the `revision.h` header:\n>\n>  ...\n>\n> -int cmd_walken(int argc, const char **argv, const char *prefix)\n> +int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n>  {\n>  \t/* This can go wherever you like in your declarations.*/\n>  \tstruct rev_info rev;\n>  \t...\n>\n>  \t/* This should go after the git_config() call. */\n\nShouldn't this be s/git_config/repo_config ?\n\n> -\trepo_init_revisions(the_repository, &rev, prefix);\n> +\trepo_init_revisions(repo, the_repository, &rev, prefix);\n>\n>  \t...\n>  }\n> @@ -305,7 +305,7 @@ Then let's invoke `final_rev_info_setup()` after the call to\n>  `repo_init_revisions()`:\n>\n>  ----\n> -int cmd_walken(int argc, const char **argv, const char *prefix)\n> +int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n>  {\n>  \t...\n>\n> --\n> 2.39.5 (Apple Git-154)\n"},{"id":"519174","messageId":"CAOLa=ZRG2LWrivhqv-gn9x3Apyd1v1qtVqRLY9Sc6B1z34Fw5w@mail.gmail.com","threadId":"63546","inReplyTo":"20250529192036.75408-3-lucasseikioshiro@gmail.com","subject":"Re: [GSoC PATCH 2/2] MyFirstContribution: add walken.c to meson.build","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2025-05-29T20:02:29Z","receivedAt":"2025-05-29T20:02:31Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:\n\n> Instruct in the documentation to also add an entry in meson.build for\n> builtin/walken.c, as currently both Meson and Make are supported.\n>\n\nNice.\n\n> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n> ---\n>  Documentation/MyFirstObjectWalk.adoc | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\n> index 29d26abb47..3b66e48dd9 100644\n> --- a/Documentation/MyFirstObjectWalk.adoc\n> +++ b/Documentation/MyFirstObjectWalk.adoc\n> @@ -96,12 +96,19 @@ maintaining alphabetical ordering:\n>  { \"walken\", cmd_walken, RUN_SETUP },\n>  ----\n>\n> -Add it to the `Makefile` near the line for `builtin/worktree.o`:\n> +Add an entry for the new command in the file of our two build systems (Make\n> +and Meson) before the entry for `worktree`:\n>\n\nSuper nit: The 'our two build systems' is a bit out of context, which is\nwhy you also mention them in parenthesis. Perhaps we can simply name\nthem directly. Perhaps something like:\n\n  Add an entry for the new command in both the Make and Meson build\n  systems, before the entry for `worktree`:\n\nFeel free to ignore this :)\n\n> +- In the `Makefile`:\n>  ----\n>  BUILTIN_OBJS += builtin/walken.o\n>  ----\n>\n> +- In the `meson.build` file:\n> +----\n> +  'builtin/walken.c',\n> +----\n> +\n>  Build and test out your command, without forgetting to ensure the `DEVELOPER`\n>  flag is set, and with `GIT_TRACE` enabled so the debug output can be seen:\n>\n> --\n> 2.39.5 (Apple Git-154)\n"},{"id":"519175","messageId":"CAOLa=ZTt4eFLZ3kak4g_kW=UH0YGbUMFgB617wvUzTtQ4me6-Q@mail.gmail.com","threadId":"63546","inReplyTo":"20250529192036.75408-1-lucasseikioshiro@gmail.com","subject":"Re: [GSoC PATCH 0/2] Update MyFirstObjectWalk with struct repository and meson","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2025-05-29T20:06:54Z","receivedAt":"2025-05-29T20:07:07Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:\n\n> Hi!\n>\n> I was studying for GSoC using this documentation, but I found out that two\n> things were outdated:\n>\n> 1. The lack of using the `struct repository *repo*` parameter in some functions;\n> 2. There were a instruction for adding the new command to the Makefile, but\n> there are no mentions to Meson.\n>\n> This patchset updates this documentation file, and hopefully will help future\n> new contributors.\n>\n\nThanks for this. These documents are often missed by regular\ncontributors since they don't refer to them as much as newcomers. So\ngood to see that it is being updated.\n\nI've left some small comments, but overall this looks good.\n\n> Lucas Seiki Oshiro (2):\n>   MyFirstContribution: use struct repository in examples\n>   MyFirstContribution: add walken.c to meson.build\n>\n>  Documentation/MyFirstObjectWalk.adoc | 27 +++++++++++++++++----------\n>  1 file changed, 17 insertions(+), 10 deletions(-)\n>\n> --\n> 2.39.5 (Apple Git-154)\n"},{"id":"519208","messageId":"aDlltNOH5pWBbwTQ@pks.im","threadId":"63546","inReplyTo":"20250529192036.75408-3-lucasseikioshiro@gmail.com","subject":"Re: [GSoC PATCH 2/2] MyFirstContribution: add walken.c to meson.build","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-30T08:00:52Z","receivedAt":"2025-05-30T08:01:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, May 29, 2025 at 04:20:36PM -0300, Lucas Seiki Oshiro wrote:\n> diff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\n> index 29d26abb47..3b66e48dd9 100644\n> --- a/Documentation/MyFirstObjectWalk.adoc\n> +++ b/Documentation/MyFirstObjectWalk.adoc\n> @@ -96,12 +96,19 @@ maintaining alphabetical ordering:\n>  { \"walken\", cmd_walken, RUN_SETUP },\n>  ----\n>  \n> -Add it to the `Makefile` near the line for `builtin/worktree.o`:\n> +Add an entry for the new command in the file of our two build systems (Make\n> +and Meson) before the entry for `worktree`:\n>  \n> +- In the `Makefile`:\n>  ----\n>  BUILTIN_OBJS += builtin/walken.o\n>  ----\n>  \n> +- In the `meson.build` file:\n> +----\n> +  'builtin/walken.c',\n> +----\n\nIt's a bit hard for the reader to know _where_ to add this. How about we\nsay this instead:\n\n    ----\n    builtin_sources = [\n      ...\n     'builtin/walken.c',\n      ...\n    ]\n    ----\n\nThat should make it was easier to figure out.\n\nPatrick\n"},{"id":"519505","messageId":"20250602205021.4223-1-lucasseikioshiro@gmail.com","threadId":"63546","inReplyTo":"20250529192036.75408-1-lucasseikioshiro@gmail.com","subject":"[GSoC PATCH v2 0/2] MyFirstObjectWalk: update with struct repository and meson","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-06-02T20:50:19Z","receivedAt":"2025-06-02T20:50:34Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Hi!\n\nThis v2:\n\n- Applies the suggestions from Karthik to the commit messages and the\n  documentation content;\n\n- Makes it more clear where to place the new Meson, as pointed by Patrick.\n\nThanks!\n\nLucas Seiki Oshiro (2):\n  MyFirstContribution: use struct repository in examples\n  MyFirstContribution: add walken.c to meson.build\n\n Documentation/MyFirstObjectWalk.adoc | 35 +++++++++++++++++++---------\n 1 file changed, 24 insertions(+), 11 deletions(-)\n\n-- \n2.39.5 (Apple Git-154)\n\n"},{"id":"519506","messageId":"20250602205021.4223-3-lucasseikioshiro@gmail.com","threadId":"63546","inReplyTo":"20250602205021.4223-1-lucasseikioshiro@gmail.com","subject":"[GSoC PATCH v2 2/2] MyFirstContribution: add walken.c to meson.build","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-06-02T20:50:21Z","receivedAt":"2025-06-02T20:50:39Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Instruct in the documentation to also add an entry in meson.build for\nbuiltin/walken.c, as currently both Meson and Make are supported.\n\nHelped-by: Karthik Nayak <karthik.188@gmail.com>\nHelped-by: Patrick Steinhardt <ps@pks.im>\nSigned-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n---\n Documentation/MyFirstObjectWalk.adoc | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\nindex a4ba6e21ec..413a9fdb05 100644\n--- a/Documentation/MyFirstObjectWalk.adoc\n+++ b/Documentation/MyFirstObjectWalk.adoc\n@@ -96,10 +96,23 @@ maintaining alphabetical ordering:\n { \"walken\", cmd_walken, RUN_SETUP },\n ----\n \n-Add it to the `Makefile` near the line for `builtin/worktree.o`:\n+Add an entry for the new command in the both the Make and Meson build system,\n+before the entry for `worktree`:\n \n+- In the `Makefile`:\n ----\n+...\n BUILTIN_OBJS += builtin/walken.o\n+...\n+----\n+\n+- In the `meson.build` file:\n+----\n+builtin_sources = [\n+   ...\n+  'builtin/walken.c',\n+   ...\n+]\n ----\n \n Build and test out your command, without forgetting to ensure the `DEVELOPER`\n-- \n2.39.5 (Apple Git-154)\n\n"},{"id":"519507","messageId":"20250602205021.4223-2-lucasseikioshiro@gmail.com","threadId":"63546","inReplyTo":"20250602205021.4223-1-lucasseikioshiro@gmail.com","subject":"[GSoC PATCH v2 1/2] MyFirstContribution: use struct repository in examples","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-06-02T20:50:20Z","receivedAt":"2025-06-02T20:50:47Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Add the parameter `struct repository *repo` to the cmd_walken function.\n\nSince commit 9b1cb5070f (builtin: add a repository parameter for\nbuiltin functions, 2024-09-13), all the cmd_* have the `repo` parameter\nand new commands must follow this convention, so the documentation\nshould also be changed.\n\nChange the `git_config` calls to `repo_config`, also passing the `repo`\nparameter, as since 036876a106 (config: hide functions using\n`the_repository` by default, 2024-08-13) the non-repo config functions\nare no longer recommended as they use the global `repository` variable.\n\nHelped-by: Karthik Nayak <karthik.188@gmail.com>\nSigned-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n---\n Documentation/MyFirstObjectWalk.adoc | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\nindex f03753dfc0..a4ba6e21ec 100644\n--- a/Documentation/MyFirstObjectWalk.adoc\n+++ b/Documentation/MyFirstObjectWalk.adoc\n@@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:\n #include \"builtin.h\"\n #include \"trace.h\"\n \n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \ttrace_printf(_(\"cmd_walken incoming...\\n\"));\n \treturn 0;\n@@ -86,7 +86,7 @@ int cmd_walken(int argc, const char **argv, const char *prefix)\n Also add the relevant line in `builtin.h` near `cmd_version()`:\n \n ----\n-int cmd_walken(int argc, const char **argv, const char *prefix);\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);\n ----\n \n Include the command in `git.c` in `commands[]` near the entry for `version`,\n@@ -193,7 +193,7 @@ initialization functions.\n \n Next, we should have a look at any relevant configuration settings (i.e.,\n settings readable and settable from `git config`). This is done by providing a\n-callback to `git_config()`; within that callback, you can also invoke methods\n+callback to `repo_config()`; within that callback, you can also invoke methods\n from other components you may need that need to intercept these options. Your\n callback will be invoked once per each configuration value which Git knows about\n (global, local, worktree, etc.).\n@@ -221,14 +221,14 @@ static int git_walken_config(const char *var, const char *value,\n }\n ----\n \n-Make sure to invoke `git_config()` with it in your `cmd_walken()`:\n+Make sure to invoke `repo_config()` with it in your `cmd_walken()`:\n \n ----\n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \t...\n \n-\tgit_config(git_walken_config, NULL);\n+\trepo_config(repo, git_walken_config, NULL);\n \n \t...\n }\n@@ -250,14 +250,14 @@ We'll also need to include the `revision.h` header:\n \n ...\n \n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \t/* This can go wherever you like in your declarations.*/\n \tstruct rev_info rev;\n \t...\n \n-\t/* This should go after the git_config() call. */\n-\trepo_init_revisions(the_repository, &rev, prefix);\n+\t/* This should go after the repo_config() call. */\n+\trepo_init_revisions(repo, &rev, prefix);\n \n \t...\n }\n@@ -305,7 +305,7 @@ Then let's invoke `final_rev_info_setup()` after the call to\n `repo_init_revisions()`:\n \n ----\n-int cmd_walken(int argc, const char **argv, const char *prefix)\n+int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)\n {\n \t...\n \n-- \n2.39.5 (Apple Git-154)\n\n"},{"id":"519535","messageId":"aD6RY99Me3bPoB--@pks.im","threadId":"63546","inReplyTo":"20250602205021.4223-1-lucasseikioshiro@gmail.com","subject":"Re: [GSoC PATCH v2 0/2] MyFirstObjectWalk: update with struct repository and meson","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-06-03T06:08:35Z","receivedAt":"2025-06-03T06:08:46Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Jun 02, 2025 at 05:50:19PM -0300, Lucas Seiki Oshiro wrote:\n> Hi!\n> \n> This v2:\n> \n> - Applies the suggestions from Karthik to the commit messages and the\n>   documentation content;\n> \n> - Makes it more clear where to place the new Meson, as pointed by Patrick.\n> \n> Thanks!\n\nIt would be great if you could include the range-diff for future patch\nseries. You can either generate it via git-format-patch(1), or use a\ntool like b4 that automates a lot of this for you. This would help\nreviewers to see what exactly has changed.\n\nIn any case, this version looks good to me. Thanks!\n\nPatrick\n"}]}