diff options
| author | Karthik Nayak <karthik.188@gmail.com> | 2024-11-27 17:28:26 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 10:32:20 +0900 |
| commit | 3687a4b3e1c8edac080480677f35a5d267fee6e1 (patch) | |
| tree | 55a80a82469b8f4d24be4d9b171ca3f2ae50f31e /commit.h | |
| parent | Merge branch 'kn/pass-repo-to-builtin-sub-sub-commands' into kn/midx-wo-the-r... (diff) | |
| download | git-3687a4b3e1c8edac080480677f35a5d267fee6e1.tar.gz git-3687a4b3e1c8edac080480677f35a5d267fee6e1.zip | |
midx-write: pass down repository to static functions
In 'midx-write.c' there are a lot of static functions which use global
variables `the_repository` or `the_hash_algo`. In a follow up commit,
the repository variable will be added to `write_midx_context`, which
some of the functions can use. But for functions which do not have
access to this struct, pass down the required information from
non-static functions `write_midx_file` and `write_midx_file_only`.
This requires that the function `hash_to_hex` is also replaced with
`hash_to_hex_algop` since the former internally accesses the
`the_hash_algo` global variable.
This ensures that the usage of global variables is limited to these
non-static functions, which will be cleaned up in a follow up commit.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions
