]> git.ipfire.org Git - thirdparty/git.git/commit
builtin: pass repository to sub commands
authorKarthik Nayak <karthik.188@gmail.com>
Mon, 25 Nov 2024 14:55:30 +0000 (15:55 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Nov 2024 01:36:08 +0000 (10:36 +0900)
commit6f33d8e255cb2ff738cd28eab22751efb7c2d6ce
tree5d2830f4bd30852d1ae082a0bccb26652ff7d689
parent6ea2d9d271a56afa0e77cd45796ea0592aa9c2d4
builtin: pass repository to sub commands

In 9b1cb5070f (builtin: add a repository parameter for builtin
functions, 2024-09-13) the repository was passed down to all builtin
commands. This allowed the repository to be passed down to lower layers
without depending on the global `the_repository` variable.

Continue this work by also passing down the repository parameter from
the command to sub-commands. This will help pass down the repository to
other subsystems and cleanup usage of global variables like
'the_repository' and 'the_hash_algo'.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 files changed:
builtin/bisect.c
builtin/bundle.c
builtin/commit-graph.c
builtin/config.c
builtin/gc.c
builtin/hook.c
builtin/multi-pack-index.c
builtin/notes.c
builtin/reflog.c
builtin/refs.c
builtin/remote.c
builtin/sparse-checkout.c
builtin/stash.c
builtin/submodule--helper.c
builtin/worktree.c
parse-options.h
t/helper/test-parse-options.c