diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-05-17 10:18:19 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-17 10:33:36 -0700 |
| commit | ed93ea16025decb60eb91308d682884e263e6f85 (patch) | |
| tree | ed27ff45724032a288d82cbd745bd128a4f8bd87 /refs/refs-internal.h | |
| parent | refs: adjust names for `init` and `init_db` callbacks (diff) | |
| download | git-ed93ea16025decb60eb91308d682884e263e6f85.tar.gz git-ed93ea16025decb60eb91308d682884e263e6f85.zip | |
refs: rename `init_db` callback to avoid confusion
Reference backends have two callbacks `init` and `init_db`. The
similarity of these two callbacks has repeatedly confused me whenever I
was looking at them, where I always had to look up which of them does
what.
Rename the `init_db` callback to `create_on_disk`, which should
hopefully be clearer.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/refs-internal.h')
| -rw-r--r-- | refs/refs-internal.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 56641aa57a..c3d5f0a6cd 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -530,9 +530,9 @@ typedef struct ref_store *ref_store_init_fn(struct repository *repo, const char *gitdir, unsigned int flags); -typedef int ref_init_db_fn(struct ref_store *refs, - int flags, - struct strbuf *err); +typedef int ref_store_create_on_disk_fn(struct ref_store *refs, + int flags, + struct strbuf *err); typedef int ref_transaction_prepare_fn(struct ref_store *refs, struct ref_transaction *transaction, @@ -668,7 +668,7 @@ typedef int read_symbolic_ref_fn(struct ref_store *ref_store, const char *refnam struct ref_storage_be { const char *name; ref_store_init_fn *init; - ref_init_db_fn *init_db; + ref_store_create_on_disk_fn *create_on_disk; ref_transaction_prepare_fn *transaction_prepare; ref_transaction_finish_fn *transaction_finish; |
