diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-07-01 14:22:20 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-01 14:46:36 -0700 |
| commit | c44185f6c10fb2d306efe505112982a7c3b93789 (patch) | |
| tree | 98e2f1411a2f14a3be954f8ef16f0ccf78d77005 /builtin/grep.c | |
| parent | odb: get rid of `the_repository` in `odb_mkstemp()` (diff) | |
| download | git-c44185f6c10fb2d306efe505112982a7c3b93789.tar.gz git-c44185f6c10fb2d306efe505112982a7c3b93789.zip | |
odb: get rid of `the_repository` when handling alternates
The functions to manage alternates all depend on `the_repository`.
Refactor them to accept an object database as a parameter and adjust all
callers. The functions are renamed accordingly.
Note that right now the situation is still somewhat weird because we end
up using the object store path provided by the object store's repository
anyway. Consequently, we could have instead passed in a pointer to the
repository instead of passing in the pointer to the object store. This
will be addressed in subsequent commits though, where we will start to
use the path owned by the object store itself.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/grep.c')
| -rw-r--r-- | builtin/grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index a1d7ee7af3..336cfcab6f 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -462,7 +462,7 @@ static int grep_submodule(struct grep_opt *opt, /* * NEEDSWORK: repo_read_gitmodules() might call - * add_to_alternates_memory() via config_from_gitmodules(). This + * odb_add_to_alternates_memory() via config_from_gitmodules(). This * operation causes a race condition with concurrent object readings * performed by the worker threads. That's why we need obj_read_lock() * here. It should be removed once it's no longer necessary to add the |
