diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-05-17 10:18:14 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-17 10:33:36 -0700 |
| commit | 1febabff7a3945537b5cd7ec0ad4a4e8b2ba9001 (patch) | |
| tree | cf3d2b9a2d3fe86049ad022bb3792b6b5182062d /refs/files-backend.c | |
| parent | 46536278a8b77de9b8726799c998b4b82ee9a7d9 (diff) | |
refs: adjust names for `init` and `init_db` callbacks
The names of the functions that implement the `init` and `init_db`
callbacks in the "files" and "packed" backends do not match the names of
the callbacks, which is inconsistent. Rename them so that they match,
which makes it easier to discover their respective implementations.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/files-backend.c')
| -rw-r--r-- | refs/files-backend.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index a098d14ea0..2c9d5e0747 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -89,9 +89,9 @@ static void clear_loose_ref_cache(struct files_ref_store *refs) * Create a new submodule ref cache and add it to the internal * set of caches. */ -static struct ref_store *files_ref_store_create(struct repository *repo, - const char *gitdir, - unsigned int flags) +static struct ref_store *files_ref_store_init(struct repository *repo, + const char *gitdir, + unsigned int flags) { struct files_ref_store *refs = xcalloc(1, sizeof(*refs)); struct ref_store *ref_store = (struct ref_store *)refs; @@ -102,7 +102,7 @@ static struct ref_store *files_ref_store_create(struct repository *repo, get_common_dir_noenv(&sb, gitdir); refs->gitcommondir = strbuf_detach(&sb, NULL); refs->packed_ref_store = - packed_ref_store_create(repo, refs->gitcommondir, flags); + packed_ref_store_init(repo, refs->gitcommondir, flags); chdir_notify_reparent("files-backend $GIT_DIR", &refs->base.gitdir); chdir_notify_reparent("files-backend $GIT_COMMONDIR", @@ -3283,7 +3283,7 @@ static int files_init_db(struct ref_store *ref_store, struct ref_storage_be refs_be_files = { .name = "files", - .init = files_ref_store_create, + .init = files_ref_store_init, .init_db = files_init_db, .transaction_prepare = files_transaction_prepare, .transaction_finish = files_transaction_finish, |
