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.c | |
| 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.c')
| -rw-r--r-- | refs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1938,9 +1938,9 @@ const char *refs_resolve_ref_unsafe(struct ref_store *refs, } /* backend functions */ -int refs_init_db(struct ref_store *refs, int flags, struct strbuf *err) +int ref_store_create_on_disk(struct ref_store *refs, int flags, struct strbuf *err) { - return refs->be->init_db(refs, flags, err); + return refs->be->create_on_disk(refs, flags, err); } int resolve_gitlink_ref(const char *submodule, const char *refname, |
