]> git.ipfire.org Git - thirdparty/git.git/commit
MyFirstContribution: use struct repository in examples
authorLucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Mon, 2 Jun 2025 20:50:20 +0000 (17:50 -0300)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2025 00:28:52 +0000 (17:28 -0700)
commit08c3aaf5bad99128a8bfb451bf7b56c447ad5e86
tree514dc42ec08d9ac684bccd517d2ae2f579ee6d79
parentb07857f7dcffee4d3b428df8dce6c9b49a57c9c1
MyFirstContribution: use struct repository in examples

Add the parameter `struct repository *repo` to the cmd_walken function.

Since commit 9b1cb5070f (builtin: add a repository parameter for
builtin functions, 2024-09-13), all the cmd_* have the `repo` parameter
and new commands must follow this convention, so the documentation
should also be changed.

Change the `git_config` calls to `repo_config`, also passing the `repo`
parameter, as since 036876a106 (config: hide functions using
`the_repository` by default, 2024-08-13) the non-repo config functions
are no longer recommended as they use the global `repository` variable.

Helped-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/MyFirstObjectWalk.adoc